Visual Studio Lightswitch

I invested 3 years in VS Lightswitch C# (server) and JS (mobile web app) development deployed on MS Azure.
Then MS pulled the plug on LS leaving me dead in the water. What a frigging waste of money and the opportunity cost was massive.
Anyhow, what I’d like to do is re-write the whole app in Bubble. I have the perfect prototype with data field types relationships and so on plus I could potentially clone what I already have working.
I’d appreciate any advice on this topic for a Bubble newbie.
Thanks, Mark.

Been there too … :frowning_face:

If LightSwitch follows MVVM model, you could say that Bubble follows MVW :grinning:

Anyhow, if you look for the Model part, you can find it under the Data tab. Similarities with LS are in the fact that with Bubble you can pretend that there are no primary keys, everything is done automagically, like in LS which has Entity Framework behind the scenes. If you need to make a many-to-one relationship to another table, you just proclaim one of the fields to be of a corresponding “entity type” that you already defined (entity type is called data type in Bubble). This is a foreign key, but you access it in expressions as Order’s Customer, for instance. Normally, you don’t bother with primary keys in Bubble, but you can use them if needed.

If you go in the opposite, one-to-many direction, one possibility is to proclaim a field to be a list of things (records in tables are “things”). For instance, you can have Customer’s Orders (in this case Orders is a field in Customer data type). However, in LS the collection of things actually leads to corresponding records in another table, in Bubble the IDs of things are physically saved as a list (a kind of array) within the Customer record. And this list has to be “manually” filled when you store the data in tables. This is usually done by workflow actions. These lists within fields are for now limited to 10.000 IDs.

If you don’t create this kind of fields as lists, you can still acces the relating records with the expressions like Search for Orders, setting the search condition to Customer = This group’s Customer, for instance (group is a container for widgets, see bellow).

Bubble doesn’t make a difference between 0…1 - n and 1 - n, and you also have to delete related records, if this is necessary.

In Bubble you deal with View quite a lot, and it is quite reach in comparisson to pure LS. Basically you have containers (page, group, popup …) for other widgets (text, input, check box …), and you can assign a data type to it. Then, a thing of this data type can be searched for (in design time you use expression) or sent to this group (in run time with workflow actions, like Element Actions | Display data), and widgets within it can relate to its corresponding fields with expressions like This group’s Customer’s Name.

There is a special group called Repeating group which can hold a list of things, in this way you can show related records in one-to-many direction, or a list. Containers can be deeply nested.

Thus, with container/widget expressions you have a sort of a ModelView. A powerful possibility is widgets’ Conditional tab, where you can set their properties including data expressions conditionally.

You can also find a sort of a Controller part in Bubble, which is mostly in workflows, a kind of event-driven flow of actions.

Besides all that, you get also a decent user management system, with security which is data-oriented and you can find it under Data | Privacy. This is a must for a production application. Besides that, you can also condition the user interface on authenticated user.

Behind the scenes a separation to server and client “modules” can be seen, but bubble developer is usually spared from that. My only concern related to that was the data access; search expressions are being optimized, but if you do a lot of nested searches then a page can become really slow.

And yes, you can add your own html, css and javascript client side code, and even develop your own plugins or use plugins from other Bubblers.

At a first glance, Bubble has simplistic approach and you might think that nothing much can be build with it (considering a relatively small number of workflow actions and expression “functions”), but in fact you might be surprised how powerful it is.

Unfortunatelly, you cannot “import” anything directly from LS. The data migration can be done, but if you have a lot of tables and relationships, it can be cumbersome.


Hi eftomi
Thank you very much for your detailed response.
You have answered all the questions that were concerning me before diving into this conversion project.
The one big advantage I have is that all the design, validation, processes etc. are all fully working in LS. So, I can develop in stages literally copying from the design and functionality side by side.
I am very encouraged by your explanation and am most grateful for the effort you you went to - especially as you understand LS and the “false dawn” it turned out to be.
Best regards, Mark.

Glad to help :slight_smile: The conversion in steps is working for me, too!

I suggest that you play with Bubble with typical ‘school’ examples firstly, like web store etc, where you will find your own developing patterns (how to name and comment things, whether to use bindings or workflows to update the database …), because if you have a complex UI and database, things might become a bit messy (you forget where exactly you implemented some functionality :slight_smile:).

Then, try to find the hardest parts of your application, in UX, business rules or database, and try to partially implement that. If it works, then the whole app will work in Bubble.

One major difference is of course that Bubble is completely on the cloud, but you probably know that. That might be important, depending from your needs or of your customer.

Hi Tomaz
Thanks for the great advice.
As Abraham Lincoln said “give me an hour to chop down a tree and I’ll spend the first 20 minutes sharpening my axe”.
I’ll take it one step at a time.
Regards, Mark.

1 Like

Sorry for your problems.
But then - why again going into proprietary tech (bubble) that anytime can have plug off, rather than learning something that you could put anytime, anywhere?
Or, since you went into azure, c#, etc - why not M$ PowerApps then?

Very good question. If Bubble goes down, the source code will be published openly (team promised that, which is reasonable), but we’ll loose the continuous improvement.

As LightSwitch from M$ went down, so PowerApps can go. Heck, you are not safe with such beasts as .NET anymore, with MS going to .NET Core and slowly dropping classic .NET with all WCFs, WWFs, etc.

I just hope that Bubble team will cope with their core systems and growing number of apps. There should be some way to export the app to some other technology, but cannot imagine the effort. Take, for instance, Radzen, which creates apps in Agular4 (client) and .NET Core (server). If Radzen gets deprecated, you still have the source code. Another such full stack tool uder development is Meteor Kitchen.

I like Bubble pretty much, but it would be nice to have a way out if needed.

I tried Powerapps and it’s very useful - especially now that it’s able to be embedded in Power BI.
But to me it’s more like IFTTT and not for Building serious applications.
Just my opinion.
Good luck, Mark.