CPPSERV


Home Projects Jobs Clientele Contact

cppserv


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Next Layer for web apps on top of CPPSERV



So, here is the idea for next layer to build on top of CPPSERV.

What I want to have, is an application framework, which allows me to
write my objects whith their functions and _not_ to worry about deciding
which function to call wen.

Let's take a standard example: on-line retail store.
I could define following classes: Catalogue, Category, Item, Order,
OrderItem, etc.
They would all have their respecitve member functions to do whatever
modifications
to object state they need.

Now, as it is, I would probably write one or perhaps few servlets, that
would take
some sort of "action" parameter, as well as other data, and based on
that decide
which function to invoke for given request. I would need to organise and
track precisely
which objects call which functions, how they interact, etc.

i.e. Catalogue object could generate calls to Category and Item objects,
along the lines of:

<A HREF="StoreServlet?oid=xzzy11102&action=display>Fruits</A>
<A HREF="StoreServlet?oid=xzzy11103&action=display>Vegetables</A>

<A HREF="StoreServlet?oid=foo1231&action=addToOrder>Apple</A>

Now, if I ever change data that some function needs, i'll need to go through
all code, and make sure references to that function have all nessesary data.
Of course, the only way to find out if something is missing is through
exhaustive
testing. This is only one of maintainance problems - I think we could
easily come
up with many other scenarios.

The framework I have in mind should take care of this at compile-time.
i.e. it should allow to generate calls to other objects and do parameter
checking,
either through macros, or, better through class templates. It should
also take
care of dispatching calls, and basic verification of argument validity
at run-time.

Another aspect of any large web application is object persistance and object
caching. I am not sure at this point if these functions should be part
of same
framework, or should be separated, and be used in conjunction with each
other.

-- 
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com


Authoright © Total Knowledge: 2001-2008