Re: [jug-discussion] OGNL presentation on Tuesday
You fly in I will spring for drinks. Ollie On Sun, 2004-03-07 at 18:56, Drew Davidson wrote: Erik Hatcher wrote: On Mar 7, 2004, at 6:58 PM, Tim Colson wrote: Also curious about : + TypeConverter (converting between different types) I really wish I could be there for Drew's presentation... I'm sure there are parts of OGNL that I'm clueless on but would come in quite handy. I've toyed with TypeConverter a fair bit... it is like the BeanUtils Converter capabilities, except more powerful. It sits in between an expression and the corresponding setter and morphs types if needed. If you fly in I'll buy you dinner :-) And this might be completely off topic... not sure... but how are OGNL expressions used in a Tapestry template? It's actually trivial. Since most folks are familiar with Struts, it is like the property path expressions you use on the html:* tags. Except on steroids. If your page exposes a Customer object named customer, you would use this to display the customers name: span jwcid=@Insert value=ognl:customer.name/ You could use that exact same expression on a text field: input type=text jwcid=@TextField value=ognl:customer.name/ And it binds in both directions to pre-populate the text box for rendering, and to set the customer name property on form submission. The ognl: prefix is only needed when doing the implicit syntax in the HTML templates. The @Insert and @TextField can be moved to the specification file and the expressions done separately also. I'm just showing the lazy (more fun) way - but being more rigorous with the separation has great merit too. Excellent summary. My explanation pales in comparison. - Drew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [jug-discussion] OGNL presentation on Tuesday
I wish I could be there. I really want to learn more about Ognl. I will be out of town. Can you post the slides on the website? -Original Message- From: Drew Davidson [mailto:[EMAIL PROTECTED] Sent: Sunday, March 07, 2004 4:46 PM To: [EMAIL PROTECTED] Subject: [jug-discussion] OGNL presentation on Tuesday Everyone, As you know I'm going to present on OGNL next Tuesday at the JUG meeting. I was planning on doing this talk in April so I haven't given a lot of thought as to what people would be interested in hearing about OGNL. OGNL is a very rich framework and there are several aspects to it that would be of interest, depending on the amount you already know about it. Here are some possible outlines of interest: * OGNL language features - it's a binding language, not a mere expression language. let's get that straight right off the bat. - what OGNL does for you that other expression languages also do - what OGNL does for you that other expression languages do not - property navigation + what's a property? + what's a navigation chain? - index access (including the OGNL object indexed properties) applied to properties + how objects are index accessible - numeric types - collection manipulation + indexed access (plus dynamic subscripts) + projection + selection - lambda expressions - who is using OGNL? + Tapestry web application framework + WebWork web application framework + WebOGNL web application framework + JSP 2.0 EL replacement + Plug-in for BSF allows everyone to use OGNL + Many other silent users + If anyone knows of a use of OGNL other than these? I'd like to know! * OGNL API - OgnlContext: the center of attention - Set vs. get for expressions - OGNL extension API + PropertyAccessor (accessing named properties) + ElementsAccessor (getting iterations of objects) + MethodAccessor (calling instance static methods) + NullHandler (handling null results from property gets and method calls) + TypeConverter (converting between different types) + MemberAccess (for lowering protection on normally inaccessible private, protected and package protected methods, fields, etc.) * OGNL 3 - same OGNL language - totally rewritten, cleaner API + parser gets it's own package + implementations of extensions API now has it's own package + org.ognl.el package defines only 2 classes, the rest are interfaces + clearly delineated lines of responsiblity between Expression implementors (parse tree), Environment, ExecutionEnvironment and Extensions. + type conversion is now integral to all aspects of expression evaluation - new package names: org.ognl.el, org.ognl.el.parser, org.ognl.el.extensions and org.ognl.util - environment interface for registering extensions - exposed execution context interface (was OgnlContext, but the API only showed it as a Map) + DefaultExecutionContext implements ExecutionContext to provide an all-in-one parser, registry and execution context suitable for simple expression executions + DelegatedExecutionContext delegates to a shared environment so that registry, runtime reflection cache, etc. are shared - parse tree now has better structure and clearly defined role - exposed Expression class encapsulates parse tree for syntax analysis + defines hierarchy + exposes Visitor interface for walking expressions + exposes get and set operations + exposes static syntax analysis methods: isConstant, isSimpleProperty, isSimpleNavigationChain - caching (reflection information, etc.) is more manageable through pluggable Reflector class - almost everything is pluggable; most of the classe - TypeConverter subsumes NullHandler and now has more robust ability to handle any conversion - all extensions except ClassResolver is now associatable with a class to facilitate fine-grained customization www.ognl.org - I thought you were a web developer so why does www.ognl.org use frames you moron? are you still living in 1997? - replace frames on the OGNL website: why Drew is so lazy - getting rid of that awful late-90s-beveled purple look on www.ognl.org - at least the license plates link to the OGNL and WebOGNL license These are just some suggestions. Feel free to let me know what you think would be interesting for me to talk about. - Drew -- +-+ Drew Davidson | OGNL Technology Professional Open Source
Re: [jug-discussion] OGNL presentation on Tuesday
Richard Hightower wrote: I wish I could be there. I really want to learn more about Ognl. I will be out of town. You are in danger of not being able to call yourself a Tucsonan :-) Can you post the slides on the website? Sure. - Drew -- +-+ Drew Davidson | OGNL Technology Professional Open Source +-+ | Email: [EMAIL PROTECTED] / |Web: http://www.ognl.org / |Vox: (520) 531-1966 |Fax: (520) 531-1965\ | Mobile: (520) 405-2967 \ +-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [jug-discussion] OGNL presentation on Tuesday
I am a weekend Tucsonan. -Original Message- From: Drew Davidson [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 11:00 AM To: [EMAIL PROTECTED] Subject: Re: [jug-discussion] OGNL presentation on Tuesday Richard Hightower wrote: I wish I could be there. I really want to learn more about Ognl. I will be out of town. You are in danger of not being able to call yourself a Tucsonan :-) Can you post the slides on the website? Sure. - Drew -- +-+ Drew Davidson | OGNL Technology Professional Open Source +-+ | Email: [EMAIL PROTECTED] / |Web: http://www.ognl.org / |Vox: (520) 531-1966 |Fax: (520) 531-1965\ | Mobile: (520) 405-2967 \ +-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jug-discussion] OGNL presentation on Tuesday
On Mar 7, 2004, at 6:58 PM, Tim Colson wrote: Also curious about : + TypeConverter (converting between different types) I really wish I could be there for Drew's presentation... I'm sure there are parts of OGNL that I'm clueless on but would come in quite handy. I've toyed with TypeConverter a fair bit... it is like the BeanUtils Converter capabilities, except more powerful. It sits in between an expression and the corresponding setter and morphs types if needed. And this might be completely off topic... not sure... but how are OGNL expressions used in a Tapestry template? It's actually trivial. Since most folks are familiar with Struts, it is like the property path expressions you use on the html:* tags. Except on steroids. If your page exposes a Customer object named customer, you would use this to display the customers name: span jwcid=@Insert value=ognl:customer.name/ You could use that exact same expression on a text field: input type=text jwcid=@TextField value=ognl:customer.name/ And it binds in both directions to pre-populate the text box for rendering, and to set the customer name property on form submission. The ognl: prefix is only needed when doing the implicit syntax in the HTML templates. The @Insert and @TextField can be moved to the specification file and the expressions done separately also. I'm just showing the lazy (more fun) way - but being more rigorous with the separation has great merit too. Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jug-discussion] OGNL presentation on Tuesday
Tim Colson wrote: - I thought you were a web developer so why does www.ognl.org use frames you moron? are you still living in 1997? - replace frames on the OGNL website: why Drew is so lazy LOL. :-) John Mitchell has flogged me about this mercilessly (deservedly). I'm just trying to head off further scorn by attacking myself :-) The first bits sound the juiciest to me... * OGNL language features - it's a binding language, not a mere expression language. let's get that straight right off the bat. - what OGNL does for you that other expression languages also do - what OGNL does for you that other expression languages do not - property navigation + what's a property? + what's a navigation chain? - index access (including the OGNL object indexed properties) applied to properties + how objects are index accessible - numeric types - collection manipulation + indexed access (plus dynamic subscripts) + projection + selection - lambda expressions Ok, I'll add that to my internal tally of votes (voting results so far: OGNL Language talk: 1 vote, all others: 0) Also curious about : + TypeConverter (converting between different types) The TypeConverter is very useful in OGNL 2.x, it becomes very much more so in OGNL 3. In OGNL 2.x the TypeConverter is basically contextless - you really don't get a whole lot of information about what value is being converted for what purpose, just a value and a type to convert to. Useful, but in limited circumstances. The OGNL 3 TypeConverter takes over the role of the NullHandler also and allows you to perform conversions and null substitutions when types are not compatible. The function that TypeConverter performs is basically as a dual-purpose casting and null-substitution mechanism. The new TypeConverter also gets much more context about the nature of the conversion (method argument, method result, property, constuctor, array constructor) so you can fine-tune how things are converted and null-substituted to your heart's desire. And this might be completely off topic... not sure... but how are OGNL expressions used in a Tapestry template? I'm sure that The Hatchet will respond to this as he is now a Tapestry Demigod :-) but I'll give it a shot. Tapestry uses OGNL expressions the way they were meant to be used: as binding expressions. Values are settable and gettable so that you can use a single expression to extract a value from a root object then also set the value into that object. The templates have a specification attached to the HTML that declares which variables, paramters, etc. are present for the different elements on the page. These parameters and variables can be read from and written to using OGNL. So if you have an incoming request parameter, for example, and you want to bind it to an object through an expression you can just state the path to the variable's value and OGNL will take care of converting the value from a String (which all parameters are) or String[] into the right type, dynamically for the expression. Parameters between components are likewise coded and converted - Tapestry has the idea of a component, which may have parameters (similar to a method call). The parameters are specified as being input only (meaning that they are sent to the called component only) or they can be synchronized (which means that the value is given to the component, the component does its thing, then the value is rewritten back to the caller with a (possibly different) value. Thus the same expression can be used in multiple scenarios. That's the Mr. Magoo version, of course, since I'm not a Tapestry Ghod yet. I am a WebOGNL god, wanna talk about how OGNL is used in that? :-) - Drew -- +-+ Drew Davidson | OGNL Technology Professional Open Source +-+ | Email: [EMAIL PROTECTED] / |Web: http://www.ognl.org / |Vox: (520) 531-1966 |Fax: (520) 531-1965\ | Mobile: (520) 405-2967 \ +-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jug-discussion] OGNL presentation on Tuesday
Erik Hatcher wrote: On Mar 7, 2004, at 6:58 PM, Tim Colson wrote: Also curious about : + TypeConverter (converting between different types) I really wish I could be there for Drew's presentation... I'm sure there are parts of OGNL that I'm clueless on but would come in quite handy. I've toyed with TypeConverter a fair bit... it is like the BeanUtils Converter capabilities, except more powerful. It sits in between an expression and the corresponding setter and morphs types if needed. If you fly in I'll buy you dinner :-) And this might be completely off topic... not sure... but how are OGNL expressions used in a Tapestry template? It's actually trivial. Since most folks are familiar with Struts, it is like the property path expressions you use on the html:* tags. Except on steroids. If your page exposes a Customer object named customer, you would use this to display the customers name: span jwcid=@Insert value=ognl:customer.name/ You could use that exact same expression on a text field: input type=text jwcid=@TextField value=ognl:customer.name/ And it binds in both directions to pre-populate the text box for rendering, and to set the customer name property on form submission. The ognl: prefix is only needed when doing the implicit syntax in the HTML templates. The @Insert and @TextField can be moved to the specification file and the expressions done separately also. I'm just showing the lazy (more fun) way - but being more rigorous with the separation has great merit too. Excellent summary. My explanation pales in comparison. - Drew -- +-+ Drew Davidson | OGNL Technology Professional Open Source +-+ | Email: [EMAIL PROTECTED] / |Web: http://www.ognl.org / |Vox: (520) 531-1966 |Fax: (520) 531-1965\ | Mobile: (520) 405-2967 \ +-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jug-discussion] OGNL presentation on Tuesday
Thomas Hicks wrote: Just reading over the list, it seems like you must do everything in the Language Features section (and especially what this thing is used for, why, the tradeoffs, and comparisons to competitors, etc.). In many ways the language section stuff segues into the API stuff because each language feature has a corresponding extension API. I think that an introductory start might work best on this and let the presentation flow to the level of discussion. If people want to know the gory details then so be it. Then, it seems like the API section must be crucial to actually using it, yes? Not always. There are users of OGNL who have no interest in the API - Tapestry, WebWork, etc. They just see it as a language. So the API stuff is for the hardcore developers who want to extends the functionality. The most interest I've seen is with the TypeConverter and PropertyAccessor stuff because they usually reap the most benefits. I'm not sure from this list whether OGNL 3 exists or is just a roadmap. If it exists, a bit on it would also be interesting, plus some overview/status/blurb on WebOGNL. (I downloaded the user manual on that one but it was still mostly blank sections). OGNL 3 exists, but is not yet available. I'm at the point where I like the API and am ready to publish the first version for public review. There are just a couple of issues to be ironed out. IMHO, you can ditch the ognl.org web site stuff. I should have delimitted that section with some smileys or something. It was a joke for anyone who has visited my site and had their eyeballs burn in their skull. :-) - Drew -- +-+ Drew Davidson | OGNL Technology Professional Open Source +-+ | Email: [EMAIL PROTECTED] / |Web: http://www.ognl.org / |Vox: (520) 531-1966 |Fax: (520) 531-1965\ | Mobile: (520) 405-2967 \ +-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]