OOP Review: Protected and Private

You already coding something and you are start engaging with OOP or Object Oriented Programming. But have you heard of these two attributes? Maybe you are in a start up company for example, and as new advocate of programming concepts you want to be trained but yet there is none since the company is starting really fast. Due to a lot of clients there is not much of a time that you will be thought or explained what are the tech jargon or technical terms are there to learn.

Let’s go back a few years back, where in these concepts are defined during class, College. Before we head on to the definition, remember on your youth where in you are not really listening to your instructor, not because she is boring or something else, but what the hell is she/he talking about?

I was asked this day to define the two, protected attribute and private attribute. There is really a thin line between the two. The protected attribute is defined that only the current class and subclass can access the method or property. The private attribute is that only the current class can have access to the method and cannot be inherited.

I guess to be able to grasp the definition on an ideal scenario is that to have an example of those two attribute and see it in actual program. The concept is to have everything private as possible. This is to have a more security and the program is not easily overridden. Code something today and try to use those attribute so you will able to differentiate in the actual code or program the two attributes.

Here are some cool discussions of the two.

https://stackoverflow.com/questions/8353272/private-vs-protected-visibility-good-practice-concern

https://stackoverflow.com/questions/1020749/what-are-public-private-and-protected-in-object-oriented-programming

Happy Coding!

Advertisements

Project Genesis Update: Tracking the System Flow

The project is in smooth sailing, it’s been a while I put up an update regarding the system progress so here it is. There is a already a lot of going on with in terms of code, the design has been re-engineered and will be back with the details on a later time. Currently I already logged an estimated 32 hours of work in the project, I know it should be due this month well the effort is different from the actual time line being rendered. Anyways, I am tracking the progress from a spreadsheet created in Google Sheets.

I am listing down the functionalities of the system and from there they obtain a number that will be the reference for all sub functionalities or updates regarding the main function. I am already updated the database, optimizing some tables and fields for faster performance. I already have a few bugs under my sleeve, luckily I already extinguished those bugs. Currently the system already saving information about the students and already have the listing of the existing students. Improvements on this module and changes is still underway, the focus is on the flow of the system first and setting all the necessary variables and information to create a class, assigning teachers and validation if ever there is a need to create a section. Also the capabilities to have an inquiry sheet, this is where the potential students can be saved well virtually they are not enrolled, yet, but they should be in the system already by the time they decided to enroll, the system is readily to activate them as students.

snipped.PNG

There are a lot of potential in the system, I am not saying it will be great, but it will be awesome.

Up to the next update guys!

Happy Coding!

Project geneSIS: Coding started

Hello WebDevs, it’s been a while that I started this project and I’ve been on and off of the project for the last two weeks. I got off in a very bad momentum but I am slowly doing the project as planned. I alread started coding and I am creating the administration panel template for the project. The screens will be patterned to the template and the body will be the only one changing from time to time or when the user switch pages.

I wanted to have a screenshot of the work so far but it seems there is nothing much to show, but I will share on this blog soon. So far the pages that were created were the template and some forms or will be the entry points of the date needed on the web application.

Exciting times! Probably June will be the best month to launch the initial version. This is for educational purposes for those starting off with PHP. Then we will improve the system as we go along and start another system with different approach, probably with a framework or we start on the bootstrap.

If you are starting off in PHP, maybe you put your views or requests on the comment section.

Happy Coding.