Hi Michael, >> # Private methods >> $self->{PRIVATE}->{bar} = >> sub { >> ... >> };
> This looks really ugly. Usually I use functions to give the code a > better structure. If we use this way to define functions then we can > forget about the function and simply write one big function "new". Was just a thought and I admit it isn't pretty. But I think the variant package foo; my $private = sub { ... }; is not that ugly, not contained in new() and also looks quite similar to a normal subroutine definition. > I also think about the API class to isolate the original server class in > the meanings of the variables. The API class includes a reference to the > server. Every access to the API uses functions and no variables (e.g. > get_access_control and set_session). If you call get_config then you get > the config instance. I use the API class to verify the interface usage > and some logic from the user interface. sounds good. > The major problem for me is actually the size of the classes. I want to > get a class which beginners can really easily use to create a new > interface. So a big a server class with the API inside is perhaps a > problem for the coding. Nevertheless I'm faraway from commiting. So > perhaps I can unify the two parts if I'm finished. I don't think size matters much here :-) Just document the API well (POD inline) and everything will be fine for interface coders. A skeleton interface showing the basic usage would be of great help, too. > Actually the server is running and I try to avoid the usage of global > variables. If I connect to the server then the server usually crashes ;) > The next issue is the access control. What controls the access > (OpenCA::UI or OpenCA::Server) and what is controlled (API access or UI > usage). Questions over questions. Perhaps I have in mid january a > running server for evaluation. I am very much looking forward to the new API! Martin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ OpenCA-Devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/openca-devel