Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming problem for potential Zend Framework devs

What is a great problem I can give a couple of potential devs that don't know Zend Framework?

My goal is mainly to determine their ability to learn something new quickly and by themselves (namely, the framework). It would have to be something they would normally complete in a couple of hours, but that in this case, since they are not familiar with the framework, would take them some more hours because of the additional reading and stackoverflow.com usage ;) , so, something that I can have them do over a weekend.

Also, the problem would have to be very directed to the View and Controller part, as frontend work is mostly what I'll be needing from them. (and the Zend Framework doesn't really help out with Model very much). The problem would probably require them to do a little ajax, and generally "pretty, functional, but not very complicated in the backend" stuff.

like image 391
cambraca Avatar asked Feb 26 '23 03:02

cambraca


1 Answers

For me, basic skills that each ZF developer should have are connected to these:

  1. Writing custom view helpers - it would be best, if they had to be custom namespace, not Zend, because that will learn them how to register helper path in View.
  2. Definitely write some forms classes using Zend_Form (and fight with decorators;). Maybe even some custom form elements, which also will require to register helper path AND new namespace - basic skills.
  3. Writing simple ACL system. And there you can check how they do it - which gives you information about their software architecture knowledge. Do they implement as a Plugin? Maybe hardcoded in index.php? Or custom controller and init or preDispatch method.
  4. Auth - In ZF its 10-15 lines, but you have to search for it :)
  5. Some db model work - simple. Two, three tables and relations between them - it can be simplest ACL table: users, role, user_has_role.
  6. Using layout of course and using ZF's view helpers to append scripts and styles.
  7. Defining some custom routes.
  8. Implemement caching at some level.
  9. Understanding how bootstrap works - for mostly of these task it will be easiest to use Bootstrap and application.ini based Bootstrap resources.

Simple "app" which will cover almost all of that skills could look like that:

  1. Simple database which have three tables: user, role, has_role. In user table column created_at which is automaticaly set when I insert record. (covers Zend_Db_Adapter, application.ini).
  2. App has three modules/controllers/pages - call it what you want.
    a) ability to add, remove and edit user and roles. Typically CRUD. Additionally, you can say that grid has to be frontend side (jqGrid, DataTables etc.) using AJAX to get data from app. There you will check if they implement AJAX output at their own, or use ZF's contextSwitch feature. (covers Zend_Db_Table_Abstract, relations between them, understanding of model, Zend_Db_Select, Views and maybe viewhelpers like appendScript, Zend_Form)
    b) uploader for custom files - such a web based storage. Simple form to upload file and table bellow with list of them and possibility to download (covers security, could cover Zend_Form and Zend_File_Transfer, maybe partials in view if they use the same table as in a))
    c) page which display 10 last tweets of whoever you want from Twitter, which must be cached for x hours.(covers Zend_Cache, and then maybe Zend_ervice or XML,JSON knowledge - depends how they implement it)

Additionally, app requires user to log in using login and password (you can say, that registration must be another part of an app). And for take advantage of ACL system, user has access only to b) and c) (and of course register/login page ;), but admin to all three pages.

And now you have two aproaches.
First is saying:

"It must be in ZF. But form has to be made using Zend_Form, and models using Zend_Db_Table_Abstract. For auth you must use Zend_Auth for ACL front controller plugin And so on....

Second way is saying:

"It must be in ZF. How you do it internally - it's totally your buisness - but it must work."

Which will you choose, depends from your needs :)

PS. Personally, at the recruitment process I use second approach (sometimes even without specifying framework) - because like I said before, it shows me candidates way of thinking - which is also important. Do candidate is "DIY person" which want to do everything by her/himself, despite the fact that there are already 10 such solutions, or she/he rather RTFM person, or both. When you have to do app and on you own figure how to do it, which components to use, it's more creative. And after candidate make such app, you still can do a code review and show them where something could be done differently - that way they learning something new and maybe you will learn something from their approach :)

like image 52
Radek Benkel Avatar answered Apr 01 '23 06:04

Radek Benkel