Monday, January 2, 2012

Software Engineer 'Title'

What do software engineers really do?


Software engineering concerned with creating and maintaining software application by applying technologies and practies from computer science, project management, engineering, applications domains and other fields.


A software engineer is in charge of assembling extensive amounts of code into working applications, as well as updating and fixing problems in existing software. A software engineer is also referred to as a programmer, because the main duties of a software engineer involved programming computers.


A software engineer works on actually developing working software solutions. There is some debate over whether a software engineer should rather be referred to as a developer or programmer, because of connotations held by the term engineer. Much charge that software development is not held to the same rigorous and exacting standards as fields such as electrical engineering, and therefore should not be associated with other, more strict forms of engineering.

The title of software engineer, as a result of these controversies, is bestowed rather haphazardly. The industry itself has not yet come up with widely agreed upon practices for licensing software engineers. Something other engineering disciplines have and so even a person without formal training may be referred to as a software engineer.

The role of software engineers, in society is expanding as computers and their applications become more pervasive. Economically, socially and politically, computers are charging the world everywhere they reach, and software engineers are building the tools that drive that change.

Ultimately, what a software engineer is and what their specific jobs are is open to some debate. It is clear that they play an integral part in the development of software applications for computer systems, integrating not just programming skills but also design and conceptual skills as well.

Some may build database structures, while others may work on the embedded software necessary to make electronic devices function, and still others may write games and consumer-level applications. Whatever the specific role of an individual software engineer, the fundamental job of generating code to help a computer act or react stays the same.

Conclusion are you software engineer enough?

Wednesday, December 28, 2011

Skinny Japan House

Skinny Japan House




House in Horinouchi - house of Mizuishi Architect Atelier in Japan

The spacious interior windows let enough daylight, and a combination of white walls and warm light wood intended to expand the visual space of relatively small dwellings.


House in Horinouchi - house of Mizuishi Architect Atelier in Japan


House in Horinouchi - house of Mizuishi Architect Atelier in Japan

Geometrical layout of the premises provides a logical and efficient use of each piece of a dwelling house, the connection between the first and second levels which occurs through the air stairs. Some sections of the two levels combined to form a single loft space.


House in Horinouchi - house of Mizuishi Architect Atelier in Japan

A unique home built on a triangular site located between the river and the road, but because its architecture is a direct response to the problem posed by territorial.


House in Horinouchi - house of Mizuishi Architect Atelier in Japan

Japanese architectural studio Mizuishi Architect Atelier has built a unique home to make up our collection of unusually narrow housing . Two-storey House in Horinouchi located in Tokyo ( Japan ) and is intended for the family of three people.


House in Horinouchi - house of Mizuishi Architect Atelier in Japan


House in Horinouchi - house of Mizuishi Architect Atelier in Japan

individual mobile furniture elements tend to make space and ergonomic versatility. Plot area was 52.14 m2, building area - 29.07 m2.


Tuesday, December 27, 2011

Luxurious Santorini Grace Hotel

Picture of Luxurious Santorini Grace Hotel


















Sunday, March 28, 2010

CodeIgniter VS CakePHP




I almost fear putting this kind of post together as it's bound to pull the fanatics (in the negative sense of the word) out of the woodworks. Right off the bat, let me just say that I've tried to be as fair and honest in this assessment and I've tried to keep it just to the facts while interjecting what my preferences are.

I'm pitting these two frameworks against each other but there really isn't a clear winner. Each has its strengths and weaknesses and ultimately falls to what your preference for certain features might be.

Why compare these two?

CakePHP and CodeIgniter are quite similar in their approach on a number of things, including their support for PHP4. Any mention of one inevitably leads to someone mentioning the other.


They both attempt to create an MVC architecture which simply means they separate the (data) Model from the Controller (which pulls data from the model to give to the view) from the View (what the user sees).


They both use Routing which takes a URL and maps it to a particular function within a controller (CakePHP calls these actions). CodeIgniter supports regular expressions for routing, whereas you'll have to wait until CakePHP 1.2 for that feature. Correction: CakePHP 1.1 supports regular expression for routing but it's not detailed in the manual and is getting updated in 1.2.


They both support Scaffolding which is an automated way of generating a view based on the model. Scaffolding is meant for simple prototyping and CodeIgniter takes it a step further by requiring a keyword in the URL to even access the scaffolding. I'm guessing one could omit the keyword, leaving this feature essentially optional. I prefer not to have to use the keyword as I sometimes build personal projects not intended for public eyes and using a keyword would be a nuisance.

And the list goes on...

Approach to Simplicity

I believe much of CodeIgniter's appeal is its simplicity in its approach. Most of the work is done in the controller, loading in libraries, getting data from the model, and pulling in the view. Everything is in plain sight and you can really see how things work.


CakePHP's simplicity comes via automation (euphemistically referred to as "automagic"). It makes the coding process quicker but harder to figure out "what is going on" without popping your head into the core. For me, I like to understand how everything works and I've had to poke around under the hood more than once. For people just getting started, things probably look a little daunting.

Working with Models

CodeIgniter's model handling is fairly straightfoward and basically allows you to mimic a standard SQL query with a few straightforward commands like these examples:

$query = $this->db->getwhere('mytable', array(id => $id), $limit, $offset); $this->db->select('title')->from('mytable')->where('id', $id)->limit(10, 20); $query = $this->db->get();

Note: the method chaining in the second part of this example is only available in PHP5.

You can also create a model object, load it in and build custom methods to handle a custom task. You'd want to do this in the model and not the controller to help isolate code into the MVC silos.

CakePHP takes a slightly different route by automatically loading in the model that matches the current controller (controllers tend to be named similarly to the models they are associated with). You can turn off this automated loading and even assign different models that should be loaded by the controller instead.

CakePHP also takes things further by establishing all the model associations for you, allowing for some really easy querying. For example, assuming I'm in a controller named post_controller, I could do the following:

$this->Post->Comment->findAllByPostId($id)

I chose this particular query because it shows two different concepts. The first is the fact that I can access the Comment model via the Post model (assuming I've defined that association in the Post model). The second is the fact that I have a method called findAllByPostId. CakePHP allows records to be grabbed via findByX and findAllByX queries where X is equal to the field name you're trying to find.

Where I think Cake shines is in its ability to pull in all associated data automatically. Take the following query as an example:

$this->Post->findById($id)

This query would automatically pull in all the comments associated with this Post. Really handy stuff.

Validation

When working with models, you'll inevitably have to handle data validation. Data validation in CodeIgniter is handled via a validation class. A set of rules get defined and assigned to the validation object. The validation object automatically (I assume) validates the data passed via the URL or form. From there, you can decide how that gets handled. The validation class can also help automate some of the process of setting error messages for specific fields.

CakePHP handles its validation through the model itself in one of two ways. The first uses a single test against each field defined in a validate variable declared in the model. This works okay for simple stuff but it quickly becomes a cumbrance. Beyond simple validation, I take advantage of the beforeSavecallback to perform any custom validation, invalidating any fields that fail.

It's a toss up for me as to which one "wins". CakePHP 1.2 will have its validation system reworked a bit to allow for more flexibility.

Views

CakePHP handles this fairly well by using a default layout (which you can easily switch at runtime). The layout has two variables be default: title_for_layoutand content_for_layout. Each action automatically links to a particular view which gets spat into place. Again, it's the "automagic" approach. As long as you name your files a specific way, controllers automatically get linked to models and views. It's easy enough to override all of this, too, and define your own layouts or view files. There's no convenient way to get the generated view data, however, making custom built caching mechanisms difficult to implement.

CodeIgniter takes a very straightforward approach: like include files, almost. Each file gets loaded in and processed. There's a templating class but it doesn't simplify things much beyond the built-in view handling. You can mimic the CakePHP approach by always including the header and footer calls but it's not as seamless. CodeIgniter offers hooks allowing view and caching mechanisms to be overridden and replaced with a custom system.

Out of the Box Features

CodeIgniter in my mind wins this hands down with classes for FTP, Email, File Uploading, XMLRPC, Zip encoding and more.

CakePHP on the flip side comes pretty light but tries to make up for it using the Bakery. You can, like CodeIgniter, easily drop in 3rd party classes for any features you might need. Interestingly, although I haven't tried it, you could probably drop in many of the CI classes into CakePHP without issue.

Auto-loading

CakePHP allows for application-wide changes to be done via the base application controller that all other controllers inherit from. Likewise, you can create global model methods using the application model file. However, you can fine tune things at the controller level using any of the controller-level callbacks (beforeFilter, afterFilter and beforeRender). Things like auto-loading helpers and components can also be specified easily at the individual controller level.

CodeIgniter allows for the auto-loading of helpers, libraries and plugins but does this application-wide.

Documentation

Documentation is key to understanding any framework well enough to develop within it.

CodeIgniter has a complete list of all components with each method and property documented within. CI also has forums and a wiki which feature a lot of user-submitted code.

CakePHP, on the other hand, isn't as well organized. The manual is starting to show its age with some sections not really going much beyond what the APIoffers. Because of the format of the original documentation, you can also get it in other formats such as CHM and PDF. CakePHP has the Bakery which contains user-submitted articles, components, etc. The dev team also hangs out heavily on the IRC channel (#cakephp at irc.freenode.net). Finally, there's the CakePHP Google Group which is pretty active.

Final Verdict

I'm a pretty pragmatic individual and I honestly feel that these two frameworks have a lot going for them. They take a much simpler approach to application development than the complexity that is something like Symfony.

I'm still personally a fan of CakePHP over CodeIgniter for much of the "automagic" that I mentioned. And it's shortcomings have been getting addressed with each new iteration (1.2 will be a considerable leap over 1.1 but it will still be awhile before it's released).

Notes

This comparison was based on the documentation for CodeIgniter 1.5.2 and having used CakePHP 1.1. I have specifically avoided the subject of performance due to the amount of time required to design, develop and test such a thing.

Code Igniter


Hi all,

This topic is about framework for PHP, do u know bout CakePHP, Zend Framework, Symfony and CodeIgniter framework?
From my experience on developing web based system using PHP I never used framework but I realize that code I've write no one is best practice all is like "tibai jer janji jalan". What advantage of using framework or OOP?

  • Time saving - The amount of time saved by not having to type in complex code in a lot of situations cuts the time of many projects by over 50% in most cases.
  • Reuse of code - Many web sites that you develop have common features. Because of the way that each part of the code is separate, you are able to copy over controllers, models and view folders to the next project. An example of this is that in every project that requires a content management system(CMS) we are able to copy across the login system. Something that used to be quite a time consuming process. Now we copy it across, and add the users, and we are set to go.
  • Access to services API's - with the way that the web is moving these days, having the ability to twitter, yahoo and Google amongst others is a great way of expanding a web site with ease.
  • Community assistance - There is a large community out there which is always willing to help. When you are proficient with the framework, you can also assist others, which will also improve your coding experience.(Not to mention the warm fuzzy feeling that you get for helping)
  • Easy plugin creation - When you have a feature you want to add to the framework, just simply create a plugin, in a directory that you can copy to all your projects. I created a image resizing plugin, which allows me to upload an image and resize it with 3 lines of code. Unbelievable, when you consider how long this would usually take and the best thing is, once I made it, I have this feature available in all future projects. The time saving benefits can be enormous.
Why CodeIgniter?

- It is simple framework and simple installation like other source of PHP codes.
- Ease of code handling
- For beginner of OOP PHP and beginner on PHP is easy to understand
- Tutorials is all over the world
- Documentation is direct to the point

please have a look CodeIgniter website for more explanation : http://codeigniter.com/

U can see how easy to understand the documentation : http://codeigniter.com/user_guide/ just click the guide to full-fill what u need.
All library from session until zip function are ready to use with simple explanation diff from CakePHP or Zend Framework even Simfony... this framework u must have experience on OOP and PHP...

Who would like to join me on developing web based system (online, intranet) template using CodeIgnitor please do email me seev009@gmail.com I need someone who is pro in PHP Framework or PHP OOP.... thanks for read my post... please comment

Sunday, August 30, 2009

PHP Pagination - Updated

Hi,

Some tips how to do a pagination only setup 1 object and called that object to a thousand of page that needed a pagination.

Create pagination.php
And for a practice in PHP using include_once to grab other object into the page.

pagination.php
//max displayed per page
$per_page = $pageCount;

//get start variable
$start = $_GET['start'];

$query = "SELECT * FROM ".$table." ".$condition;

//count records
$record_count = mysql_num_rows(mysql_query($query));

$max_pages = ceil($record_count / $per_page);

if(!$start){
$start = 0;
}

//setup prev and next var
$prev = $start - $per_page;
$next = $start + $per_page;

//set variable for 1st page
$i = 1;

//show prev button
if(!($start <= 0)){
$pagePrev = "<a href='".$page."?start=".$prev.$PageQuery."'>
Prev</a>";
$pageFirst = "<a href='".$page."'?start=0".$PageQuery."'>[First]</a>";
}

$pageNum = '';

for($x=0;$x<$record_count;$x=$x+$per_page){

if($start!=$x){
$pageNum.= "<a href='".$page."?start=".$x.$PageQuery."'>".$i."</a>";
$NoOfPage = $x / $per_page;
}
else{
$pageNum.=$i;
}
$i++;
}

$lastP = $per_page * $NoOfPage;
if(!($start >= $record_count - $per_page)){
$pageNext = "<a href='".$page."?start=".$next.$PageQuery."'>
Next</a>"; $pageLast = "<a href='".$page."?start=".$lastP.$PageQuery."'>[Last]</a>";
}

index.php

$UID = $_SESSION['uid'];

$pageCount = 25; //setting up rows per page
$table = "pengurusan_pengguna"; //table to be called
$condition = "where id_pengguna='".$UID."'"; //condition for SQL
$page = "index.php";//the page to be displayed
$PageQuery = "&nokp=".$NoKP; //the other querystring
include_once('../Function/pagination.php');//include the pagination object
$SQLSelect = "SELECT * FROM pengurusan_pengguna
where id_pengguna='".$UID."'
LIMIT $start, $per_page";
$result = mysql_query($SQLSelect);
echo "Bil. | Tarikh | Aktiviti <br />";
if(mysql_num_rows($result) > 0 ){
//Show data
$Count = 0;
while($row = mysql_fetch_array($result)){
$UID = $row['id'];
$Tarikh = $row['tarikh'];
$Aktiviti = $row['aktiviti'];
$Count++;

echo $Count." ".$Tarikh." ".$Aktiviti." <br />";
}

echo $pageFirst." ".$pagePrev." ".$pageNum." ".$pageNext." ".$pageLast;


I think this code will give you an idea how to create a pagination.

Wednesday, August 26, 2009

PHP Dynamic Web Template

Hi here I wanna share some php code on creating dynamc web template. Start code :

index.php
<html>
<table width="70%" align="center">
<tr>
<td><h1>Banner</h1></td>
</tr>
</table>
<table width="70%" align="center">
<tr>
<td width="20%">
<a href="index.php">Home</a><br />
<a href="index.php?page=tutorial">Tutorial</a><br />
<a href="index.php?section=administrator&page=index">Admin</a><br />
</td>
<td width="80%">
<?php
$section = $_GET['section'];
$page = $_GET['get'];
if($page){

//check for section
if(!$section){
$section = "inc";
}
$path = $section."/".$page.".php";

/* How it program --
Logicaly is like this :
section = administrator
page = index
path = administrator/index.php
*/

if(file_exists($path)){ //build in function
include($path);
}
else{
echo "Sorry, page does not exist";
}

}
else{
include('inc/home.php');
}
?>
</td>
</tr>
</table>
</html>
See the video below for the explaination :
Part 1

Part 2

Updated


You can test here. Thanks for viewing my blog please leave a comment..