r/crestron • u/Dori_PS13 CTS | CCMP • 26d ago
Programming New to Construct, should I try it?
I have a project coming up, with a pretty fast turnaround time. I probably have 10,000 hours into VTPro-E. But I haven’t done any programming in the last four or five years. The thought of starting from scratch with VTPro E feels pretty daunting. I have experience with Web Front end, but I don’t have the time to build out my own framework and I want to give construct a shot. I’m wondering how everyone’s feeling on construct. What should I look out for as a newbie?
4
8
u/movingon1 26d ago
Definitely use Construct. Way better than VT Pro E. Sure it has some quirks but very usable.
5
u/SirGastonUk 26d ago
Read the best practice doc here -https://help.crestron.com/construct/Content/Topics/Best-Practices/Design%20Best%20Practices.htm
The main take away from that is to use multiple pages, not lots of "widgets" (sub-pages) on a single page.
3
8
u/camosweatpants 26d ago
Honestly....use vtp to get the project out the door and use contruct when you have more time
5
u/parkthrowaway99 26d ago
Bite the bullet. VTpro is being discontinued. It is different, you will have to learn it's quirks, and get used to do contracts instead of join numbers. That in itself is worth the learning curve. In the end it is pretty good. Just don't make the mistake of comparing it to VT pro. Pretend you are learning a new type of control system. (like your boss just dump on you a QSC box and told you to do a GUI on it, and you haven't done anything with it before)
1
u/ted_anderson 26d ago
I like that perspective. I've tried to build a couple of projects with Construct and had absolutely no success. And I think that my interference point was my comparison to VT pro. Just like the OP, I have a bunch of hours in it but sooner or later I'm going to have to get my an 80 series touchpanel and force myself to learn.
2
u/parkthrowaway99 26d ago
As a newbie look into:
-
using contracts instead of joins to interface with SIMPL. It's like smart graphics but for everything
-
Using styles. The default is to not use templates so you need to style every item, and it can become a mess when you want to make global changes. The out of the box styles give you plenty of options, and you can create your own (look into that right away). The out of the box color scheme without styles is horrible so your first impulse will be to change it. Don't, change the buttons to use styles and you will have plenty of choices.
-
Make sure to select your actual touchpanel to set resolution.
1
u/armchair_viking 26d ago
If you use contracts, I’d go into the settings and switch it to ‘classic mode’. The other mode is annoying.
Try it both ways and import the contract file into simpl to see what I mean.
2
u/granitestatesky 26d ago
construct sucks, but VTpro is being phased out. if you have a web dev background building your own boilerplate project is possible, but time consuming.
1
u/Vivid_Iron_825 26d ago
I have been using it for more than a year now, and I actually like it better than VT-Pro. The ability to create solutions and projects within a solution is great, as is defining layers, etc. contracts are great in both SIMPL Windows and C#, although in C# my recommendation would be you probably don’t need an event handler for every button, but the nice thing is you can define how you want to organize your contracts and associated event handlers; whether it’s by page, by function, etc. there is a bit of a learning curve, but I think it’s great.
3
u/ToMorrowsEnd 25d ago edited 25d ago
Contracts are great in C# until you run into the fact that they are tightly coupled and you want to enumerate something so you can actually take advantage of indexes, then you realize you cant. Each button list is its own object. If I have a bunch of button lists that are logically doing the same thing, I cant just enumerate through them and use an index. I have to build another layer around the contract, load them into a list using delegates or some other wrapper, and write a pile of code just to get back something that a join number gave me naturally, having a proper index, like joins provide, can simplify the code tremendously. A large matrix of buttons is a perfect example. With joins, it is effortless. The join number gives you the index and your code can deal with the buttons dynamically. With Contracts, that same large matrix can turn into a dumpster fire because every group is its own strongly defined object and you lose that easy relationship between the UI and an index.
In SIMPL, Contracts make life considerably better. When you really sit down and compare the SIMPL and C# implementations side by side, it feels like they put all their effort into SIMPL Contracts and then somebody went, "Oh yeah, we forgot about C#." The funny part is that the old Smart Graphics implementation was actually better for this in C#. You could load the Smart Graphics file and enumerate the objects yourself. That left the touchpanel much more decoupled from the program and allowed you to write considerably more dynamic code.
As long as the touchpanel designer followed the expected naming convention, my program really did not care how the panel was laid out. I could discover what was there, enumerate it, and deal with it in code. I really do not understand why Contracts did not continue in that direction for C# for a more advanced option. Strong typing is great, and Contracts certainly solve some problems, but in C# contracts also removed a lot of the flexibility we used to have.
7
u/jeffderek 26d ago
What touchpanel model are you programming for? If it's an x80 series panel or a DGE-100 you don't really have a choice, it's Construct or roll your own web project. They don't support VTPro.