Thursday, June 5, 2014

Day 19: Linked LIsts, more Codeigniter and intro to Object-Relational Mapping

This morning we revisited the concept of linked lists and did some challenges on that topic. Although we rarely use linked lists in actual web development, learning these things are pretty important for technical interviews. Those interviewers often ask these types of conceptual questions because they want to see if you think like an engineer. Sure they might be used in lower-level machine languages. But for the purpose of what we're doing, they really have to practical value except for getting a job through technical interviews.


Switching gears back to the learning platform I am continuing to learn CodeIgniter. Yesterday was pretty much dedicated to understanding the whole concept of how that MVC works. Today is dedicated to actually making complex applications to solidify my learning.

At first the whole separation of views, controllers, and models seemed so tedious. Just a lot of extra work. I understand the whole concept of why you'd want to do it especially in applications with ten-thousands of lines of code, but it was just relatively difficult to absorb.

Here's a screenshot of my controller that allocates to the proper places depending on what the input is.



Below is a screenshot of my model. The model is what communicates with the database. At first I didn't really understand what that meant, but now I realize that all it's doing is making queries to the database (inserting data that the application wanted it to insert and retrieving data that the application requested).



And below is just a quick glimpse of the HTML output of my database queries and the form used to put data into the database.




In actuality we are just doing assignments that are similar to the ones we've done before except now we are doing them in an MVC framework. There really is a lot of beauty in how an MVC framework is structured, it makes everything look so clean and accessible. I'm definitely going to try to get this to be second nature.

In order to prep me for higher-level frameworks like Rails, I'm learning something called DataMapper which uses Object-Relational Mapping. Not really sure what that's all about but I'll know for sure by tomorrow!



I believe that you can get anything good at anything if you just put in the time. That's the kind of mentality I have right now and it's been working pretty well so far. Just gotta keep trucking along!

No comments:

Post a Comment