Page 1 of 1
WebPage and Theme
Posted: Wed May 04, 2016 10:59 pm
by mancini.emmedata
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.
Re: WebPage and Theme
Posted: Thu May 05, 2016 2:11 pm
by Stewart Marshall
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
Re: WebPage and Theme
Posted: Thu May 05, 2016 2:21 pm
by MarkD
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.
Re: WebPage and Theme
Posted: Fri May 06, 2016 4:49 pm
by mancini.emmedata
Thank you for reply.
Re: WebPage and Theme
Posted: Thu Feb 09, 2017 9:19 pm
by Jiri
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.