Friday, January 22, 2010

My Current Work…

Sorry, I forgot to told you guys what I doing here in Bali. I just keep talking about my feeling lately. Okay here we go.

I’m programmer armed with basic programming ability and some networking things. My programming language was just C++, php, and java. My collegians also get some .NET technology but unfortunately I never had one because my majority was networking. Why I become a programmer and not a network practice? That also a big question for myself. Maybe because I like it somehow. Hahaha… I should know it from the beginning, not turning at the very end of study. :-P

I was graduated at November 2009 I got my job at October 2009. Me and my friends usually make a joke that when we graduate from college, the actual meaning of Rector move the “hat string of toga” is change your status from student into unemployed, But I got lucky back then. I just skip my unemployed phase. J

At that October I was accepted in an IT corporate in Bali. The real mother of this corporate is a big mining company in aussie. Then they made a mining company branch in other country, such as Indonesia. Since the software request is quite huge for this Indonesian mining company, so the Indonesian mining company made a branch that specially handle the software development. As the profit from developing software was getting bigger and bigger, the IT branch ate her own mother (taking over the company). So actually it is a kind of big local IT corporation but manage by the Australian. Our clients usually are also Australians.

They gave me three month training. This training standardizes their entire programmer at the same minimum level of every programming language. This is good because I had the opportunity to learn .Net technology (I’m complete now). Beside language skill, they also teach us development pattern that usually used for enterprise scale application with large groups of programmer. They open my eyes into framework technology with Model-View-Controller Concept and “3 layers” concept (Data Access, Business Logic, and Presentation). Usually we just didn’t care the theory at college, now I see why the lecturer told us this is important.

I had my java skill upgrade by implementing hibernate, spring, and struts framework. Some php framework (I told you later). Play around with .Net technology (including the newest technology: WPF and silverlight). And the old prehistoricall cobol language.

After the long long training, I was assign to WTP division. It’s not “What The Puck” but “Web Technology Programmer”. Hmm… Three month training just sends me back to Web again. From the entire trainee, It just me who assigned there. This division has very few programmers, imagine, it even less than twenty. But the senior next to my cubicle was a monster, he master the php frameworks such zend, symfony, and he now build application for iPhone. I’m so junior here.

At this January, this is my actual day of work. Since there is no new project, so my manager told me to learn PHP Framework called CakePHP. I ever use this kind of framework named code igniter. The basic use of MVC framework is we don’t use the old style spaghetti code where we mix the html tag, the logic (like user authentification), and data access (querying) into one single file. Now, we split it into 3 kind components. The Controller was acting as the main brain, the model is the data access, and view as the presentation. For example when we called a page to show our profile, the controller will examine whether the user has been login or not, if not user will be redirected to login form, if already login, the controller will call the model to retrieve data from table with specific username and load data into view and give us the view contain data.

There are some extra features such as scaffolding. This feature will read the database and give you access to CRUD (create read update delete) data in tables. If you use apache mySql, it just like the phpMyAdmin page, but this one is generated by the framework. Actually this is done by just enabling (on/off) on the framework. Both CI (code Igniter) and Cake (cake PHP) have this feature. If you think it over again, it doesn’t really useful right. Because there are no actual pages that created so we can’t modify anything. We can’t edit the logic, can’t edit the themes, add or remove some fields from being shown.

Cake has a console mode and in this mode there are some commands. One of my favorite commands is to generate the CRUD pages. Just few configurations to set the database connection and every models, views, and controllers for any table are automagically done. We can modify these pages as we want. Unfortunately CI didn’t have this feature, but you can install a third party plugin called code crafter if you want to generate CRUD. But I didn’t know whether CI Code Crafter able to read the join relation between tables like cake did. Cake also has ACL (Access Control List) features to control which group of user are allowed to access a specific controller function. This is useful to handle the group user that you want to give privileges. For example if you only want group of admin that able to add and delete a post, just set the ACL. ACL can be configured using “ini” file or using database. In my assignment I used database because if we have hundreds functions, It would be pain to set one by one.

My “self learning” about cake basic and ACL is making a simple contact manager where admin can add and delete new contact. Everyone who has a contact can login and edit his/her profile but not the username and group (it will be ridiculous if regular user can edit his/her group, coz everyone would like to be an admin). Admin can manage group’s information and edit everyone’s profile. I also add some JQuery for displaying profile photo on username link tool tip and some datepicker. I found some troubles back there where linking image on css and javascript because both didn’t refer the cake webroot as default root, but I solved it using vHost setting on my apache. My simple application was finished at previous Thursday. Now, I am learning to use nested directory feature. I don’t know why my manager wants me to dig deeper into cake. Maybe he want his team has at least one expert for each framework because my senior also expert on specific framework like zend, simfony, code igniter, etc.

(dipindah dari blog yg lama, original Posted : January 16, 2010)

No comments:

Post a Comment