Wiki source code of ERDivaLook
Version 162.1 by Ravi Mendis on 2009/04/23 09:50
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
95.1 | 1 | === What is ERDivaLook? === |
![]() |
84.1 | 2 | |
3 | Much like ExcelLook, that vends excel pages, Diva look generates a Web 2.0 interface for DirectToWeb. | ||
4 | More specifically, it generates pages that are: | ||
5 | |||
6 | * Semantically-rich or **tables-less** | ||
![]() |
95.1 | 7 | * XHTML 1.0 strict compliant |
![]() |
84.1 | 8 | * Sans images, inline styles or presentation attributes |
![]() |
133.1 | 9 | * Use a CSS **theme** |
![]() |
149.1 | 10 | * Scriptaculous **effects** |
11 | * Use of **Ajax widgets** | ||
![]() |
105.1 | 12 | |
13 | = Why Table-less Markup? = | ||
14 | |||
15 | Scriptaculous, jQuery effects, etc work by manipulating CSS attributes. | ||
16 | Mostly they don't work very well on tables, if at all. | ||
17 | Furthermore, the more sophisticated widgets (like accordions) make use of effects and so don't function as they should without. | ||
18 | |||
19 | This is even more true for unobtrusive javascript for which table-less markup is usually a prerequisite. | ||
20 | Like jQuery, which takes this a step further, by applying functionality via CSS selectors. | ||
21 | (So for jQuery it is an absolute requirement). | ||
![]() |
109.1 | 22 | |
23 | Therefore, if you are developing a Web 2.0/Ajax UI, the transition to table-less markup is an imperative. | ||
24 | |||
25 | === What is a Diva Theme? === | ||
26 | |||
![]() |
135.1 | 27 | In ERDivaLook, or Diva for short, your application is not complete without a CSS theme. |
![]() |
109.1 | 28 | All images, layout, colors and font information are maintained in the CSS. |
29 | |||
30 | All your customizations to the look and layout of your application is also done in the CSS (and via D2W rules). | ||
31 | |||
![]() |
121.1 | 32 | ===== Example Diva Themes: ===== |
![]() |
109.1 | 33 | |
![]() |
123.1 | 34 | The following are a sample of themes for Diva look. The first two are included in the Wonder/Examples/Ajax/ERDivaLookExample app. |
35 | |||
![]() |
119.1 | 36 | |= Neutral |= WebObjects |= Simple |= Organica |
![]() |
139.1 | 37 | | [[image:Picture 1.jpg||]] | [[image:Picture 2.jpg||]] | [[image:Picture 3.jpg||]] | [[image:slides_directtoweb_04.jpg.jpeg||]] |
![]() |
109.1 | 38 | | D2W Neutral look reverse engineered |
39 | as a Diva Theme | D2W WebObjects look reverse engineered | ||
![]() |
119.1 | 40 | as a Diva Theme | [[//Simple//>>http://www.csszengarden.com/?cssfile=/174/174.css&page=2]] theme from css Zen Garden | [[//Organica//>>http://www.csszengarden.com/?cssfile=/188/188.css&page=0]] theme from css Zen Garden |
41 | | //Included in ERDivaLookExample// | //Included in ERDivaLookExample// | Shawn Chin [[mailto:schin@shawnchin.net]] | Eduardo Cesario [[mailto:design@criaturacreativa.com.ar]] | ||
![]() |
123.1 | 42 | |
43 | The graphics designer Eduardo Cesario wrote up his experience of developing his //Organica// design for an early prototype of ERDivaLook on his [[blog>>http://www.organicacreativa.com/organica-creativa.php?area=directtoweb&lang=en]]. | ||
![]() |
149.1 | 44 | |
45 | = Using ERDivaLook = | ||
46 | |||
47 | === Setting the D2W Page CSS === | ||
48 | |||
49 | Diva look introduces a new D2W key: **stylesheet**. | ||
50 | The CSS file computed by this key will be set as the stylesheet for the page. | ||
51 | |||
52 | e.g: | ||
53 | |||
54 | |= LHS |= key |= RHS | ||
55 | | task = 'edit' |**stylesheet**| //NeutralEditPage.css// | ||
56 | | task = 'inspect' and session.theme = 'Simple' |**stylesheet**| //SimpleInspectPage.css// | | ||
57 | |||
58 | ==== A closer look at the CSS file... ==== | ||
59 | |||
![]() |
157.1 | 60 | 1. h5.CSS Imports |
![]() |
149.1 | 61 | |
62 | {{code}} | ||
63 | |||
64 | @import url("Neutral.css"); | ||
65 | @import url("ERDIVEditPage.css"); | ||
66 | @import url("NeutralEditToManyFault.css"); | ||
67 | @import url("NeutralEditToOneFault.css"); | ||
68 | @import url("NeutralCalendarDateSelect.css"); | ||
69 | @import url("NeutralAjaxAccordion.css"); | ||
70 | @import url("NeutralEditToOneRelationship2.css"); | ||
71 | |||
72 | {{/code}} | ||
73 | |||
74 | The CSS imports a global CSS for the theme, //Neutral.css//, a generic one for the edit page //ERDIVEditPage.css// and CSS files for D2W components used on an edit page. | ||
75 | |||
![]() |
157.1 | 76 | 1. h5. Image Replacement |
![]() |
149.1 | 77 | |
![]() |
153.1 | 78 | Standard CSS image replacement applies. |
79 | |||
![]() |
149.1 | 80 | {{code}} |
81 | |||
82 | div#a form h1.edit { | ||
83 | background: url(/WebObjects/Frameworks/JavaDirectToWeb.framework/WebServerResources/EditMetalBan.gif) no-repeat; | ||
84 | text-indent: -5000px; | ||
85 | } | ||
86 | |||
87 | {{/code}} | ||
88 | |||
![]() |
153.1 | 89 | Here, the edit page banner is being set. |
![]() |
161.1 | 90 | //div#a form h1.edit// is an example of a **CSS selector**. All elements in a Diva look D2W page will begin with //div#a//. |
91 | The page title is a <h1> with a class //edit//, so the resulting CSS selector for that element would be //h1.edit//. |