Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use LightSwitch for big scale project

I am working on a project and now i am using asp.net MVC5. To summarize, this application has

  1. Basic HR module which has lots of CRUD screens
  2. Warehouse management which you can transport your equipments to other warehouses or assign to a project or person.
  3. Purchase order system without any billing.
  4. Basic project management system to manage workorders per project.

It takes too long to create CRUD screens for me. And also there is only one approval system for purchase system.

Today, i was looking for LightSwitch and see some videos.

My questions :

  1. Is it good to use LS for an application which i described above
  2. I think i need to pay for LS but i could not find good information. Which product should i need to buy. Visual Studio Ultimate ?
  3. Can I use asp.net mvc framework with LS, if LS will not be enough for me at some steps of my developments.
like image 496
umki Avatar asked Mar 07 '14 17:03

umki


2 Answers

In my experience, LightSwitch (the HTML client without any 3rd party libraries... SL is EOL) is a good choice when these criteria are met:

1) You can build your database from scratch, or your database is normalized with proper keys. Many legacy DB's will not conform to LS's desires (unique keys), forcing you to write a WCF RIA service to adapt it. This kills a lot of the RADness.

2) You don't have huge datasets. LS basically attempts to read all of the entities at once and cache them, and queries it in-memory. Working around this requires an RIA service, again killing RADness.

3) Your application is mainly CRUD, or simple operations (approval, workflow type stuff).

4) Your application does not require a super-specified UI. If you have detail-oriented people who want everything just so, you are going to be in for some pain. Remember, it's made to work on everything from an iPhone's browser to IE11 on a 1080p display, so attempting to make it pixel-perfect everywhere isn't going to happen (nor should it). Not only that, but some "obvious" things are hard to do if LS doesn't do it for you. For example, binding a dropdown to a query result set for filtering requires some doing.

5) You are familiar with jQuery[Mobile] and fully comfortable reading and writing function-flavored javascript.

6) You are willing to poke and prod JavaScript, and basically operate half-blind. The documentation for LS HTML5 isn't all that great... you basically have to read from example code scattered here and there and figure out how to adapt it, and it isn't always clear how LS wants you to do things, and doing them the wrong way results in code that looks like it works, but will have subtle issues. The binding process isn't great: it works perfectly except when it doesn't, and when it doesn't, it's often not clear why. Intellisense rarely works well (understandably so... Javascript is a poor language for static analysis).

In general, unless it's pretty much perfect for LS, or you can let LS drive your requirements a little bit, or you are a freaking whiz at advanced javascript and like a little mystery in your APIs and living on the edge, I'd say pass on the HTML5 at the moment if you have other reasonable options.

As for the SilverLight version... shrug. I have no opinion technically, but in terms of long-term solutions SilverLight won't be viable much longer.

I will say LS's deployment is pretty awesome... drops right into IIS painlessly.

like image 190
Clever Neologism Avatar answered Nov 16 '22 15:11

Clever Neologism


I've been looking at LightSwitch myself as a solution for RAD (rapid application development) about 2 weeks now. I have VS 2012 Ultimate but had to download Update 2 (I think) to get the latest HTML LightSwitch project templates. Remember that there are two flavours to LS: the default Silverlight solution and then the HTML5+jQuery version that came in the later updates. If your client does not like plug-ins, then you'd have to go the HTML5 route.

I'm a fan of using the right tool for the right solution. CRUD screens are a real pain and hence my own interest in LS. For that it is good and best used on simple CRUD form-over-data solutions such as your HR module perhaps. I'm using it for a simple user-access-and-maintenance app. It is bit of a mind shift from traditional coding as it is mainly a configuration based WYSIWIG framework, for room to add custom code in certain scenarios. Styling is tricky and painful but you can find online resources specializing in this. If you are prepared to invest the time to learn LightSwitch, you could probably save some time in the long run if building many CRUD apps in the future.

That being said, MVC's scaffolding feature also generates basic CRUD controllers and views for you. If you are already using MVC then then why relearn (in LightSwitch) how to do what you already can do easily in MVC and you are familiar with?

Purchase orders and PM type systems are typically full of business rules and exceptions. I would personally not use LS for such apps. MVC is a lot more scalable and robust for this type of development... IMO.

Hope this helps. Cheers.

like image 2
Neville Avatar answered Nov 16 '22 16:11

Neville