none
What can you do with LightSwitch and 10,000 hours of development time ? RRS feed

  • General discussion

  • Well finally we have done it. After some 10,000 hours of effort we have finally managed to turn off our old broken, battered ERP system and replace it with a brand new one crafted ( mostly ) in LightSwitch. Not bad for a two person team who really should be doing other things with their time!

    I originally began writing ERP systems 30 years ago in Visual FoxPro. This was always a diversion from my real job which was and still is running an electronics manufacturing business providing managed manufacturing solutions to high profile and highly demanding OEM organisations. This original system powered the business until it became very clear that the business was outstripping the capabilities of the system, and far from being the supportive platform that an ERP system should be, it rapidly became an out of date straight-jacket that was slowly killing us. So in our wisdom we began writing newer and better versions of our “wonderful” system in Visual Foxpro 6, then 7, then 8, and finally 9. ( note that by this time we had a very fragmented system with options in various applications which was a complete nightmare to manage and will certainly form the basis of my future book entitled “how not to develop your own ERP system and drive yourself mad in the process” ). Not unsurprisingly these projects all failed due to lack of time and resources. We then decided that writing our own software wasn’t the right thing to do, and after much searching we purchased an off-the-shelf ERP system ( at no insignificant cost I  hasten to add ) which according to the salesman should have proved to be the perfect scalable solution to our business. Of course it wasn’t and that failed too – in fact we never went live and had we done so it would have probably killed us and I wouldn’t be here writing this brief tale.

    So writing our own software was the right thing to do after all, and we started on a WinForms application that would take all our experiences and evolve them into a killer ERP system that would really set us on the right track. Great! Guess what, after 18-months that also failed given that WinForms required so much effort to get the application framework working, that time spent on the actual application development itself was minimal, and of course our resource strapped side-line ended up in failure once again.

    So here we are, in early 2010 still with an ageing, broken ERP system that was creaking just about everywhere, and a business that despite its continued growth still didn’t have the financial muscle ( or desire?! ) to go out and buy SAP or Oracle - so we resigned ourselves to failure. However just as we were about to call it quits and go and get proper jobs, Microsoft offered some divine intervention in the form of LightSwitch. After a quick review of its capabilities we decided that it was just the thing we had been waiting for, and we quickly started writing forms. I’m sure in our haste we missed the bit about it not being an enterprise solution, but coding was so fast that we just kept writing more and more forms in a fraction of the time it was ever possible to do so before. It was quicker to actually write a form and play around with it in front of the user, than it was to write the spec. in the first place. And better still, LightSwitch dealt with all the plumbing so that our time could be spent actually working on the application and the logic, and not trying to get a form to talk to a business object to talk to our SQL database. Wow!

    By late 2012, we had two major LightSwitch applications running which contained five hundred or so forms in total, and a database containing over five hundred tables ( we didn’t get out much during 2012! ). We were forced to split the application as LightSwitch progressively became slower and slower the more forms we added until there came a point where we felt it was about to give up altogether. We ended up with the main business application, and a supporting quality management application in LightSwitch, an MRP engine in WinForms ( data crunching in LS was a definite no no ), and a shop floor utilities application, once again in LightSwitch (although this will ultimately get moved to WinForms so as to provide a more user friendly feel to some of our less PC literate employees ). Finally there is a business intelligence application in WinForms containing a hundred or so reports and metrics. We find the ability to query the database and dump stuff to Excel much easier from a WinForms application than from LS.

    This killer application now handles every facet of our business from quote management and sales order processing, through job management, inventory control, aerospace traceability, purchasing, shipping and despatch, quality, metrics, reporting, finance, etc. etc. all within a complex business model operating in a dynamic and pressured business environment. So a big thank you to the team that put LightSwitch together, you have finally enabled me to write an application ( with a very under-resourced team ) that I actually finished, and that actually works!

    As a programmer, my views on LightSwitch are that for rapid application development it would take some beating. To be able to write forms very quickly and have LightSwitch take care of all the DB interaction makes life far easier than having to try and write all this yourself. The entity framework it creates is excellent, and once again saves a huge amount of time over trying to create and manage business objects yourself. It would however be nice to be able to gain access to the entity framework from a WinForms application as I find I am duplicating some of the business logic outside the main application. ( Perhaps this can be done ( oData? ), but I don’t know how! ). Some additional events might be useful, for example being able to have a Changing() method on a field in addition to the existing Changed() event would make some of the business logic easier. Reusable forms would be a boon, as having to write a customer selection window in 50 different places gets a bit of a pain, and the ability to create a cursor table in code, and have the UI bind to this in a form would be useful. The latter can be done via a RIA service but we have found this a bit messy to manage at times. We have also found it a big struggle that only one person can really work on the application at once. Again the splitting of the application helped, but it proved to be difficult to manage. Some kind of team working would be great.

    I hope that Microsoft and the LS team keep on innovating and keep the product moving forwards. With a few additions and some further development LS could really end up being a very powerful development platform. If a small team like ours can achieve the above, then surely anything is possible!?

    I would also like to thank all those people that have helped us on the forum, especially in the early days as we were trying to get to grips with LightSwitch. This forum certainly proved an excellent resource, and I’m sure we wouldn’t be as far advanced without it.

    Nick

    Managing Director and very tired software developer, Kingfield Electronics, UK.

    Friday, May 17, 2013 1:25 PM

All replies

  • What a great success story, and an inspiration to me! I'm in the process of also writing an ERP system, but I'm a 1-person team doing this in the spare time. It will take me a while to log 10,000 hours, so I better get going!

    Thank you for sharing your story Nick!


    -Christopher DeMars

    Friday, May 17, 2013 1:44 PM
  • Hi Christopher,

    You won't need 10,000 hours to get something up and running, far from it in fact. Ours is a complex system designed to cope with complex inventory and manufacturing requirements. If your DB schema is sound ( and we had a whole bunch of failed attempts before we got it right ) you can really get moving quickly. It's entirely possible with one person - that is where LightSwitch really comes into
    its own as it cuts the development time dramatically. :o)

    The reports take a while, we ended up using DevExpress as it integrates into LS, but this side of things still seems to consume lots of time and is a drudge.

    I wish you the best of luck, keep up the good work...

    Are you aiming it to use yourself, or looking to make a product out of it ?

    Best regards,

    Nick



    • Edited by NickTaylor Friday, May 17, 2013 4:28 PM Removal of typos
    Friday, May 17, 2013 4:24 PM
  • I'm aiming to make a product out of it - it's for an industry that I worked in for years but no longer work in. But I have a lot of contacts and a couple of guys from that industry willing to sell this product it I can get it to a full featured build. Luckily, I have a solid DB schema with tons of data - my last company in this industry I worked for went out of business, and part of my compensation was the old, out of date ERP system (data, code and all) that, like you, I was trying to rewrite when the company went under.

    My product will include a Sales App (Customer, Quote, and Order Management), a Production App (Order, Inventory, and Shipping Management, as well as an Employee/Job Time Clock), Administration app (Reporting/BI, Defaults/System Settings, and Employee/Rights Management), and a Customer app (Place Orders, View History, limited Customer (self) Management, Data Export/Limited Customer Reporting).

    I'm only on the Sales app, and only on the Quoting Piece, so I have a LONG way to go, especially since I can only put in about 10 hours a week (I have a full time job and a full time young family with 3 kids ages 3 and under). I started working on this in February, so I'm 5 months (roughly 250 hours)  in now.

    I'm not sure I could sell a partial solution, but I guess it depends on the pricing and the customer.


    -Christopher DeMars

    Friday, May 17, 2013 6:21 PM
  • Wow Nick! Congrats!!

    And thanks for sharing your success story. I too come from the FoxPro days and when I first saw LightSwitch I knew it was filling a much needed gap in the .NET ecosystem. That's why I was soooo excited to work for the team when they asked me. :-)

    I'm sure the team would love to see a demo and hear about your experiences if you are willing? If you are interested feel free to contact me bethma at Microsoft dot com.

    Thanks for using LightSwitch!

    -Beth


    Senior Program Manager, Visual Studio Community http://www.bethmassi.com http://msdn.com/lightswitch http://dev.office.com

    Friday, May 17, 2013 10:10 PM
  • Hi Beth,

    Many thanks for your reply, and yes I would love to share our journey with you.

    I'll be in touch shortly.

    Thanks again.

    Nick

    Saturday, May 18, 2013 5:53 AM
  • Hi Nick,

    Well done! Also very good advice on getting the data layer into shape before embarking on complex screens and other development.

    Reading your comments I think we have some tools being tested now that could help manage your LightSwitch application and ease some of the remaining development pains. Please contact us if your are interested and we can see what we can do.


    Dave Baker | Xpert360 blog | twitter : @xpert360 | Xpert360 website Opinions are my own. For better forums, please mark as helpful/answer, if it helps/solves your problem.

    Saturday, May 18, 2013 8:10 AM
  • Thanks for sharing your story with us Nick. Like Christopher, I am also a 1-person team (what was I thinking!!). I am actually working to replace an out-of-date system that I created some 13 years ago for my previous employer, that is currently running in Lotus Approach. I am having to recreate and update the DB schema, and am getting all the business requirements nailed down for what my client wants to keep, and additional features they want to add, as well as learn LightSwitch and SQL Server as I go.

    So I will be lurking around this forum more often as I dive deeper into the process.

    Tonya

    Saturday, May 18, 2013 11:06 PM
  • Thanks for sharing your story with us Nick. Like Christopher, I am also a 1-person team (what was I thinking!!). I am actually working to replace an out-of-date system that I created some 13 years ago for my previous employer, that is currently running in Lotus Approach. I am having to recreate and update the DB schema, and am getting all the business requirements nailed down for what my client wants to keep, and additional features they want to add, as well as learn LightSwitch and SQL Server as I go.

    So I will be lurking around this forum more often as I dive deeper into the process.

    Tonya

    Are you going to use Silverlight or the HTML Client?

    At this point I am suggesting people go with the HTML Client. It is a rare situation that people would not need to get to your application from a mobile device.


    The Visual Studio LightSwitch Marketplace

    http://LightSwitchHelpWebsite.com

    Sunday, May 19, 2013 2:28 PM
  • I was planning on making a desktop application. I hadn't thought of the idea of going with HTML Client, since my client uses their current system on desktops for all their users. Maybe I should check that out to see if that would work for my client. Thanks.
    Sunday, May 19, 2013 9:27 PM
  • Michael / Tonya,

    We did deploy the application for a while as a web app running on an internal webserver. We found however that during each deployment the webserver kicked all the users off the system and that rapidly proved unworkable as post go-live we are tweaking the application quite a bit.

    We are currently running our app as a desktop app which doesn't get upset if the app is republished whilst the users are active on the system. Obviously they pick up the changes automatically at the next login. We also make some use of the Excel output from the desktop version of LS which is obviously lost when the app is published as a web app. 

    Nick

    Monday, May 20, 2013 5:42 AM
  • What a fantastic journey and story Nick, congratulations to you and your partner on making it through to the other side! Your story is inspiring and reminds me of a few of my own however I can honestly say that I never had to deal with as many screens. 

    I highly recommend that you invest some time in understanding how to access your LS data through ODATA.  This will greatly assist you with consolidation of business rules when changing data providing consistency.

    IMHO an Achilles heal of LS is that one is not able to compose multiple LS projects at runtime. The monolithic solution layout as you say, makes it difficult for multi-team development and yet if there were a supported ability to modularize the LS client so we'd be able to break LS into finite modules that load on demand this would not only mitigate the mutli-developer concerns making LS a much more suitable enterprise application for development teams, but would also allow LS to scale to thousands of business forms.

    Many of us have pressed hard for a Composite Modular solution to allow for multiple LightSwitch SL clients to lazy load modules dynamically, and while we are very certain this is achievable within the confines of the existing LS architecture, we have made little inroads on getting support to make this happen.  You may recall this discussion which you were part of that discusses this very issue.

    It is such a frustrating thing to see such a core capability be left out of the mix, for if composition were available, then you'd be able to build a solution with thousands of screens, and only load requested screens/related data work spaces on-demand when a user requests the screens at runtime.

    One can only speculate that the reason that this capability is not part of LS after 3 plus years must have something to do with internal road-blocks.  Nonetheless, this is still a dream for many of us even after many years of requests that have gone largely unanswered.

    You raised some excellent wish list items and I hope that these become available in subsequent releases.

    In regards to the future, I have spent considerable time reviewing the latest HTML client and there is most definitely an amazing framework that exists under the covers, however unlike WinJS which comes with a ton of API documentation, this is very little within the LS client API front.  This is likely to come, but for now it's an adventure of discovery. I am not 100% sold on the current HTML client approach, but that's more likely due to my lack of intimate API knowledge, something that as mentioned is only made available through tireless nights of wading though the JavaScript API.  There is one HTML framework decision that for certain I am not sold on, and that is the tight integration with JQuery or JQuery Mobile. I think that was a mistake to tightly couple the LS framework with either of those two frameworks.  My reasons for saying this are more instinctual than not at this time, but most of my research suggests that there are many better enterprise alternatives to JQuery that will provide more perform ant and scalable solution, but this is not a knock against the LS team, nor MS as the LightSwitch team are an amazing bunch and have remained consistent to delivering a product that simplifies application development.  I just hope that they turn it up a notch or two and provide either documented hooks within the API, or directly address the needs of modularization in all their respective clients!

    Cheers


    Johnny Larue, http://www.softlandingcanada.com



    • Edited by John Kears Monday, May 20, 2013 12:35 PM
    Monday, May 20, 2013 12:24 PM
  • Johnny,

    Many thanks for your comments - I agree with them whole-heartedly!

    The lack of multiple projects is a killer isn't it! I feel that during this development we really have pushed LS to its capacity limits, and there have been times when we thought we had pushed it too far. We have also found that there is now an annoying pause of 45 seconds or so between the user logging in and the menu actually appearing for the first time. After that its fine. We are not doing anything in code, so I can only assume this is something to do with the internal framework creaking a bit ( or our network! ).

    The other point I should mention ( and believe me I learned this the hard way ), is that as the application has grown, the number of times a schema import falls over part way through has also increased. Our import currently takes 20-25 minutes to complete, and if the thing gives up half way through you can end up with a corrupt LSML file and then you are stuffed. I now make sure we backup the application every single time before doing a schema import. Anybody developing larger applications would be well advised to follow this regime!

    I'm hopefully going to converse with the LS team off-line in the near future, so I will be sure to raise these issues.

    Thanks,

    Nick

    Monday, May 20, 2013 2:30 PM
  • Hi Johnny/Nick,

    You guys definitely are pushing the limits with respect to the design-time scalability of LS with hundreds of entities and screens. When we look at usage data, most folks hover around the 30 screen/entity mark. You're doing the right thing by splitting up the solution into separate LS projects. 

    We also know that it's painful for team development and so we are working on making that much easier in the next release -- stay tuned for more info.

    Nick -- got your email and I'm responding now. Looking forward to chatting more.

    -Beth


    Senior Program Manager, Visual Studio Community http://www.bethmassi.com http://msdn.com/lightswitch http://dev.office.com

    Monday, May 20, 2013 4:40 PM
  • 30 Beth ?! Ooops, perhaps I forgot to read that bit before I got started!

    Its good for a hundred entities and screens at least, it does gets a bit cranky after that however!

    Great news about the next release, I'll get my wish list in the post asap. ;o)

    Many thanks,

    Nick

    Monday, May 20, 2013 5:54 PM
  • Hi Beth,

    This is awesome news !!! Please let me know if I can be of any assistance as a beta tester.

    I am hoping to attend your Tech Session next Sat in Toronto, Canada!

    Cheers

    Johnny


    Johnny Larue, http://www.softlandingcanada.com

    Monday, May 20, 2013 5:57 PM
  • Awesome! Please do come up and introduce yourself. 

    I'm working on updating my content to have more HTML goodness in it :-). Last time I did the training in Montreal the HTML client was still in Preview.

    Let me know if you have "must learn" requirements and I'll see what I can do to incorporate it.

    See you soon,
    -Beth


    Senior Program Manager, Visual Studio Community http://www.bethmassi.com http://msdn.com/lightswitch http://dev.office.com

    Monday, May 20, 2013 6:03 PM
  • Johnny,

    Thanks for the tip about backing up before doing a schema import when the application gets larger. I am not there yet, but will be before I am done.

    Tonya

    Monday, May 20, 2013 10:29 PM
  • @Tonya: at Team Foundation Services Online you can set up a FREE account to manage and keep your source code. It works very well with LS since it is all integrated with VS and is a far better option than trying to do a manual backup each time.

    All you do is to click on the Solution and select "Check In..." and it commits all your changes into the cloud repository.  You can even revert back to previous versions if you muck something up.


    Regards, Xander

    Monday, May 20, 2013 11:34 PM
  • one of the reasons we used lightswitch to build our ERP was your awesome success story.

    what should we do now with our ERP? now that Microsoft Lightswitch is gone !!


    Monday, January 21, 2019 4:43 PM
  • i need LS back ,, please MS

    rodrigo adelino

    Thursday, February 21, 2019 5:29 PM