Overview
Features
Download
Documentation
Community
Add-Ons & Services
The POCO C++ Libraries Blog

WebWidgets

Filed under: Uncategorized by peter at 10:38

We are currently in progress of changing the WebWidgets library. We now have a core library defining the GUI elements, the CodeGenerators aka Renderers are kept in a separate library. The renderer I am currently working on is a Codegenerator for ExtJs. The code is still very incomplete (especially callbacks, events, table stuff) but writing C++ code like that


Page::Ptr ptr = new Page("test");
TabView::Ptr ptrTab(new TabView("tab1"));
ptrTab->add(new Image("Image", Poco::URI("Sunset.jpg")));
Label::Ptr ptrLbl(new Label("Label"));
ptrLbl->setText("Hallo");
ptrTab->add(ptrLbl);

TabView::Ptr ptrTab2(new TabView("TabView"));
ptrTab->add(ptrTab2);
ptr->add(ptrTab);

Form::Ptr ptrFrm(new Form("theForm"));
ptrTab2->add(ptrFrm);
ptrTab2->setActiveView(0);
Image::Ptr ptrImg (new Image("img1", Poco::URI("Sunset.jpg")));
ptrImg->setText("Image");
ptrImg->setToolTip("This is just an image");

ptrFrm->add(ptrImg);
RadioButton::Ptr ptrBut2 (new RadioButton("radio"));
ptrBut2->setText("Disable");
ptrBut2->setToolTip("click here to disable");
ptrTab2->add(ptrBut2);
ptrTab->setActiveView(2);

already produces the following HTML page:

Webkit

Code is not yet in SVN, I estimate another one to two weeks until you can play with it and either start
writing your own renderers or extend the extjs one.

12 Comments »
  1. Very good!keep it up

    Comment by atu123 on April 12, 2008, 16:55

  2. expect! when we can use it in poco?

    Comment by coolzdp on April 14, 2008, 05:30

  3. I hope there is progress being made on ApacheConnector and family. This will itself have lots of potential for c++ web development.

    Comment by coward on April 14, 2008, 05:54

  4. Sounds good, I’m looking forward to seeing it.

    Is there any support for user authentication? I assume there is some form of session tracking? I ask this because I’m working on some code for cookie based session / user tracking and if it’s going to be provided I’ll stop now, if not I’ll press on and submit it as a possible poco addition when it looks a bit better.

    Comment by Mark on April 14, 2008, 11:37

  5. @ApacheConnector: code is in subversion in the poco/trunk Folder. Did you check it out already?

    @User Authentication: no, so please press on :-)

    Comment by peter on April 14, 2008, 11:42

  6. Anyone replying here interested/willing to put in some work into Poco::Servlet library?

    Comment by alex on April 14, 2008, 12:36

  7. Yes I check ApacheConnector in subversion occasionally but do you know when it will be officially released?

    Is it pretty much in a usable state?

    Some official documention and examples as usual would be good too.

    I am really looking forward to this one so that I can use C++ instead of PHP…

    Comment by coward on April 15, 2008, 00:54

  8. Does the POCO::Servlet support CGI/FastCGI?

    Or is it designed to run with ApacheConnector?

    Comment by coward on April 15, 2008, 01:12

  9. Will you be adding support for templating like ClearSilver, Smarty, Google gtemplate etc?

    Comment by coward on April 15, 2008, 01:19

  10. Servlet library currently only has POCO web server implemented. However, the design is such that writing servers (i.e. server adapters) is simple. There is a POCO-ified FastCGI library by James Mansion that could be used to expose servlet engine through Apache. I have not seen the code yet, though.
    As for ApacheConnector, POCO::Servlet currently does not relate to it.
    We would like to add many things but our main constraints are manpower and available time. That’s why we always look for contributors.

    Comment by alex on April 15, 2008, 11:22

  11. I definitely would be happy to see the servlet library as part of the POCO based web solution. The ApacheConnector approach seems to solve the same problem in a way. I haven’t attempted to make use of this but I guess it has the advantage of easier intergration with existing webserver infrastructure.
    The servlet approach is also a proven design in the Java world and Alex has already done fantastinc job of implementing this the POCO way.
    Alex what are the key missing things that stand in the way of getting this library release?

    Comment by paschal on April 29, 2008, 05:25

  12. The limitation of the ApacheConnector, as it currently stands (from a full-blown web application perspective), is that it’s not distributable. Some concerns are not addressed there, such as session tracking, user authentication etc. The distribution portion can be relatively easily achieved through a FastCGI connector. Both ApacheConnector and FastCGI can relatively easily be adjusted to interface the servlet container. As for the Servlet library itself, what is keeping it from the release is TODO list, lack of my time and/or sufficient interest/effort from contributors.

    Comment by alex on April 29, 2008, 12:57

RSS RSS feed for comments on this post. TrackBack URI

Leave a comment