well most of node template engines don't want to copy desktop gui frameworks, because html is already a gui framework. what your examples do, is solved in engines like jade via partials et al. Jade supports reusability of template componentes via partials, inheritance and mixins. in jade it is handled like this:
1. its a layout and your wicket components here are *block* statements 2. it's a partial, that implements a component 3. its a normal view, which extends the layout and includes the partials or mixings i think it's not that hard to use the components from Component wrapped in partials :D Am Donnerstag, 7. März 2013 16:19:07 UTC+1 schrieb Ernesto Reinaldo Barreiro: > > Hi, > > Thanks for your answer and your time. > > On Thu, Mar 7, 2013 at 3:41 PM, greelgorke <[email protected]<javascript:> > > wrote: > >> component is a component framework. it's components are vertical >> components bringing the whole structure they need with them. >> there are some frameworks/libs which are horizontal assembling their >> parts as a plugin systems. Express is built on top of Connect, which is a >> middleware-chain framework. Express integrates the template-engines in it, >> but you can use plain Connect and wire them together. Also nodejitsus >> http://flatironjs.org/ might be something you like, which is a modular, >> but also a full-stack web-application framework. >> >> I will have a look at http://flatironjs.org/ > > >> i think it could be easier to give you tips, if you name your >> requirements exactly. "something like Wicket" is not that exact and says >> nothing to non-java ppl. i worked with java, but never with it. What are >> the key features you're looking for? Wicket seems to offer much, at first >> glance i see "web-programming as swing programming" and Component is >> offering you exactly that: ready to use and ready to combine ui-modules >> >> > Yes you are right I should have explained myself a bit better. How does > wicket templates-components works. > > 1- You have a Class say "com.bb.A" that extends Page. Next to A you have > A.html like > > <html> > <body> > <div wicket:id="comp1"></div> > <div wicket:id="comp2"></div> > </body> > </html> > > comp1 and comp1 are placeholders. > > on A you have > > A { // assume this is a constructor for A > > add(new xxx.aa.MyTable("comp1")); > add(new yyybbb.MyOtherWidget("comp2")); > > } > > 2- xxx.aa.MyTable is a class extending "Panel". Next to "xxx.aa.MyTable" > on same "package" there is MyTable.html like > > > <html> > <body> > <wicket:panel> > Some repeater code generating a table with "placeholders" for > cell values. These placeholder could be any other components (you create or > form a library) > <wicket:panel> > </body> > </html> > > 3- You can mount a page say mount('/bla', A.class); > > Then when you access "/a" Wicket will assemble the whole component tree > and use it to render the HTML.... i.e. > > > <html> > <body> > <div>Some repeater code generating a table with "placeholders" > for cell values. These placeholder could be any other components (you > create or form a library) > <wicket:panel></div> > <div>The other component you described</div> > </body> > </html> > > This to any nesting level... The above it is just a little fraction of > what Wicket does... but more or less describes what it does as a template > engine. Needless to say this is extremely powerful as you can make very > complex components and reuse them everywhere (or ship them as jar files and > reuse them in many projects). > > This is what I mean as a "similar template engine". > > Cheers, > > Ernesto > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
