From: Salve J N. <sal...@me...> - 2005-03-08 17:09:35
|
Teemu Arina wrote: >> If I understand you correctly, you'd like to generate CSS files? >> (as opposed to generating CSS dynamically per-request.) >> >> I was thinking more in the direction of _not_ to generate any CSS >> _at_all_ - that all CSS files are static. > > I need a tool for your granny to customize it for herself. Simple > stuff. Most user interfaces have common properties that could be > changed at once with inherited CSS files. Requesting her to write a > custom CSS file just doesn't cut it ;) I'm all for a seperate package that can supply this feature, and if you'd like to make it, then you should be able to. :) >> Hmm... I was thinking more in the direction of having a standard >> set of CSS files for all pages, and then let each application add >> stylesheets on it's own, either by using an "append_style"-like >> method, or perhaps by tweaking a configuration file (e.g. the app's >> action.ini file). No tables should be needed at all. > > .ini files are fine, also. You are right. We still need a system wide > CSS file, though. server.ini? System-wide config belongs in server.ini, yes. :) e.g. ==========================8<----------< somewhere in server.ini [stylesheets] main_style_sheet = /main.css main_style_media = screen @,alternate_style_sheet = /print.css,/mobile.css @,alternate_style_media = print,handheld ------------------------------------------------->8============= >> I actually like the minimalist style OI2 currently has, even if >> it's not among the prettiest. If we try to keep the layout as >> simple as it is now (just the content/forms, and the concept of >> "boxes") I'm sure we can tidy up the look and reduce the number of >> templates without adding too much new functionality. :) > > Yep. We have gone crazy with our UI in Dicole. I also propose that > <table>:s are not used to align stuff on the screen in OI basic > theme. Columns can be achieved through other means. Tables are nice for tabular data, though. :) At work we've experimented with structuring forms using only <dl|dt|dd>, <span> and <div>. It looks promising, and we'll try to show what we're up to when things are getting ready. :) >> I kind of like the idea of widgets. It lets us do the basic stuff >> easily while keeping the resulting HTML consistent, and if I need >> to do things my own way, I still can. >> >> What kind of alternatives would you suggest? > > > A very specific widget system allows you to write a UI library that > operates similarly to something like Perl/TK. You can have containers > and all kinds of stuff in them. The UI logic is then written in perl > but separated from the business logic. The view, how the widgets are > displayed based on the generated data structure is also separated for > the interface designer. The drawback is that the designer loses some > of the control on how various pages look but well, the result is more > consistent and easier to maintain so. > > So with a web based widget UI toolkit, you basically define various > parts your application may have. The most useful part for the UI > widget toolkit is obviously the application part itself (excluding > page navigation, footers, login boxes etc). Dynamically generating > each page in a very detailed widget system is very slow in TT because > of hundreds of includes, so this could be optimized by pre-generating > applications. Detailed widget systems are to some degree predictable, > so: on server startup (or when a single application action is > accessed the first time), the UI templates for various application > actions/tasks get generated once. The resulting output for each page > is a new cached template toolkit template that is able to take in > business logic from the application. Server startup will be slow but > this way we have only one template include for each application task, > problem solved. > > That's the way I thought I would like to optimize our system but it > sure requires a lot of thinking to implement correctly. We will lose > some freedom and control in our templates but I think the consistency > is worth the effort.. and it would be the coolest UI toolkit for the > web ;) When writing a new application for OI, in most cases you don't > have to write a single template. Saves a lot of development time. I think I'll have to digest this a little... - Salve -- Salve J. Nilsen <salvejn at met dot no> / Systems Developer Norwegian Meteorological Institute http://met.no/ Information Technology Department / Section for Development |