[Warszawa-pm] WebNano

piotr pogorzelski pp w webtel.pl
Wto, 21 Wrz 2010, 02:02:20 PDT


This one checks if the first part of the path is a number - if it is it 
uses it to look for a Dvd object by primary key. If it cannot find such 
a Dvd then it returns a 404. If it finds that dvd it then redispatches 
by the next path part and passes that dvd object as the first parameter 
to that method call. Note the need to check if the called method is an
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
allowed one.
^^^^^^^^^^^^

A czemu to jest takie wazne? skoro pisze sie wlasny dispaczer to
chyba mozna wolac te moteody, ktore sie chce?
Czy bez tego sprawdzenia cos zlego sie stanie? aplikacja
sie rozsypie?


jak rozumiem ide jest taka, zeby nie mozna wywolac wszystkich
funkcji z modulu. tylko te okreslone.

dla mnie to troche chore. Zamiast okreslac co nie jest wywolywalne
lepiej przeniesc te funkcje do jakichs modulow/helperow niedostepnych
dla automatycznych dispatcherow.

upraszcza logike frejmlorku - skoro nie chcesz aby to bylo uruchamiane
nie umiesczaj funkcji w module kontrollera.

mowimy tu o automatycznych dispaczerach. bo zawsze mozna napisac
swoj - jeden wielki hash czy given/when.

--
pp


Więcej informacji o liście Warszawa-pm