The main problem is the routing, web2py routes the second arg in url to the
function, how would web2py knows if it has to be a function or a subfolder?

IMO, controllers have to be small, less code, only code which decide the
workflow, the long code I prefer to put in modules, and there I can have
subpackages.




On Thu, Feb 9, 2012 at 12:05 PM, Phyo Arkar <phyo.arkarl...@gmail.com>wrote:

> I saw other people requested long ago since  2009.
> Why it would be a bad addition to web2py , i cant understand.
>
> There are many uses cases for it , my case is one very good example :
> To separate WEB CONTROLLER code from JSON/XML RPC Services.
>
>
>
> On 2/9/12, Phyo Arkar <phyo.arkarl...@gmail.com> wrote:
> > Is that a bug or by design?
> >
> > I am using JSONRPC of web2py , i want to keep JSONRPC services int its
> own
> > subfolder so not mixed with controllers for html. But web2py is not
> > allowing me to do so.
> >
> >
> > Here is my web2py's conttrolelr path:
> >
> > /home/v3ss/web2py/applications/FastTract/controllers/
> >
> > i want to put caselist.py (which is to deal with case table part of the
> > project)
> > inside services folder. so it should look like this :
> >
> > /home/v3ss/web2py/applications/FastTract/controllers/services/case.py
> >
> >
> > All jsonRPC related services will go inside that folder.
> >
> > But when i tried to call :
> >
> http://localhost:8000/FastTract/services/case/call/jsonrpc?nocache=1328793441550
> >
> > invalid controller (services/case)
> > What can i do? I believe code folder organisation is very important
> feature
> > for Large complex systems. My Project is growing big and should be able
> to
> > organize code.
> > 50 files of code spreading inside just one controller folder is a
> > management nightmare.
> >
> > Thanks.
> >
>



-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to