WebPage and Theme

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
mancini.emmedata
Posts: 5
Joined: Wed May 04, 2016 10:46 pm

WebPage and Theme

Post by mancini.emmedata » Wed May 04, 2016 10:59 pm

Hello,

I would like to start to use Theme and WebPages but I really don't understand the choise to transform all styles in inline javascript instead of
css classes.

There's someone can clarify to me this ?

Thank you.

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: WebPage and Theme

Post by Stewart Marshall » Thu May 05, 2016 2:11 pm

Inline styles are not recommended in HTML primarily because they introduce a maintenance nightmare for anyone doing manual coding. Changing a CSS class is obviously far simpler, but of course, in VL, such things are irrelevant as the compile process generates everything for you.

From a performance perspective, there is next to no difference.

Importantly, VL doesn't require any knowledge of HTML, CCS and JavaScript and it may well be that one day we may determine that CSS better suits our requirements. Should we do this, your next compile will make CSS classes and you'll never know the difference.

That's the benefit of a high level development tool.



Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

MarkD
Posts: 627
Joined: Wed Dec 02, 2015 9:56 am

Re: WebPage and Theme

Post by MarkD » Thu May 05, 2016 2:21 pm

That benefit frees up a fairly large chunk of your brain’s ‘bandwidth’ which you can then redirect to delivering business value from your code.
The benefit also tends to magnify later when your application moves into maintenance and enhancement mode.

mancini.emmedata
Posts: 5
Joined: Wed May 04, 2016 10:46 pm

Re: WebPage and Theme

Post by mancini.emmedata » Fri May 06, 2016 4:49 pm

Thank you for reply.

User avatar
Jiri
Posts: 43
Joined: Thu Feb 11, 2016 11:41 pm

Re: WebPage and Theme

Post by Jiri » Thu Feb 09, 2017 9:19 pm

Hello,
I have (from other developer) another good reason, why using of CSS and classes might be much better than inline styles also in VL.
The reason is requirment of mixed static (html) /dynamic (VL) pages on singlke site. Using of CSS (regardless of fact, if would be manually writen, or generated from LANSA Style source) would importantly simple the common style maintenance.
In current stage, we have to separately define Themes/styles in LANSA repository for dynamic pages and classic CSS style for static pages, because the inline formating generated by LANSA cannot be used for them.
If VL would generate and use CSS and CSS tags from LANSA Themes, the LANSA style would be simple usefull for both parts of the web site, the only requirement would be to use the same class names also in static pages.

Post Reply