Consider about a web site that is a course specific web site. As most of us related with it i mean with most of us as students :) A web site that has a user entry and admins as professors and tha assitants of them. Also there are invited speakers whom have been invited to the classes and whom are in the software development market. As i did not said yet the site is the web site of the sofware programming course! See the below explaniations as example to the class diagram of the system:
There are five classes in the system.
The description is as follows:
And at last the class diagram:
Most info about class diagram will be explained in the following article. ALso some other diagrams activity or use case diagram infos and examples for the same system will be added to it.
See yas:))
Sunday, March 23, 2008
Class Diagrams
Thursday, March 20, 2008
Friday, March 14, 2008
PhpTriad
In this article i want to introduce you my favorite software tool PhpTriad :) I love it since it is easy and free to download and install. You can find lots of versions of PhpTriad for your platform. This is a link for you to download PhpTriad
http://www.sourceforge.net.
But there are many sources that you can download it from if you search on Google you will see :)
So what is PhpTriad? Php Triad is a complex tool of Php, MySQL and Apache that are your general requirements for coding in Php. Installation is very very easy. But i will explain althpugh it is just clicking the button install and done after the installation completed.
So then you installed the program let's start to using it. Fİrstly you need to click on the icon "winmysqladmin" at the adres c:/apache/mysql/bin and then you will type your user name and the password. Please choose a good one since you will need it for oyur databases and it can be setted just at the installation.If the installation is completed succsfully an icon at at the right bottom of your screen that looks like traffic lights.So it need to be green to represent of working.
It did not finished yet :) It is not easy as i said :P We have a little more work then by clicking to start at the programs, you will see a segment called 'Programs' when you click on this menu please start the program: Programs/PhpTriad/Apache Console/Start Apache. this is for to boot Apache. Wen you run the program an command console will appear at your screen which states that 'Running Apache'. Please be sure that the program is always running while you want to run the website you are coding.You need to put your files that you want to show in : C:apachehtdocs. after all of these PhpTriad is ready to use! Just run your browser and write to the adress http://localhost/filename.php ;)
I wish you to have good coding :)
Good Luck!!!
Sunday, March 9, 2008
Php Kitbag
- PHP 5
- Apache Web Server
- MySQL or MSSQL
- PHPMyAdmin
As i have said before you can get the PHP 5 program from www.php.net .
You can get the Apache from www.apache.org . From this address you can click on HTTP Servers and then download the last version of Apache. After download we are starting to installation of Apache first. By double click on the folder you have downloaded (.msi) you start to install Apache.
Friday, March 7, 2008
Introduction to PHP 2
Firstly PHP is a SSS(Server Side Script). This means if a user enter the site that is prepared by using PHP can only see the HTML output. For instance we have written a program and create an executable code. Then the executable code generates an output to the screen and you can not see the real codes of the program. This is the process of SSS. It generates an output to the screen.
So at last this is our first PHP code example :))
< html >
< body >
< ?php
echo "Hello Web!!!";
? >
< /body >
< /html >
< ?php is the code piece that the PHP codes start. PHP when realizes the sign < ? it interprets the codes until ?> sign. It does not executes the rest of the code. Since that the output of the code i have written above is that:
< html >
< body >
Hello Web!!!
< /body >
< /html >
So this is the process... As you see echo is a function like the print functions in C/C++ or Java.
See you at next article...
Monday, March 3, 2008
Introduction to PHP
PHP means "Personel Home Page Tools" which invented by Rasmus Lerdorf nearly in 1995 or earlier. It is a SSS (Server Side Script) which he needs strong on database and answers to dynamic site design needs. After the expansion of PHP had became "PHP is a Hypertext Pre-Processor".If you want more detail about history of PHP take a look at http://www.php.net/manual/en/history.php .
Now let's start to understand the capablities of PHP.For me it is capable for every work :) Since it is developed more and more it is good for everything you want to do.
- You can create your own graphics by PHP.
- You can create Flash documents without any need to Flash and some kind software.
- PHP is good for interwork with every database system such as MS SQL, MySQL etc.
- And if you can not find something you need you can write it on your own and can share it.
And it is time to explain how you can use PHP now. PHP is an platform independent web language.Firstly you need to decide on which web server you will use. I recommend you Apache which is a platform dependent server as well. If you are a Windows platform user it is nice for you to use PHPTriad. It includes both Apache, MySql and PHP. Also PHPTriad is called as sokkit after its 2nd version which you can acces from http://www.sokkit.net .
After you do this wait for your PHP codes and explainings of them and wait for next article:)
Sunday, March 2, 2008
Where to Execute Our Codes?
Although most of object oriented programming languages are mostly platform dependent we generally use soma programms to execute them. For instance JCreator is mostly known one taht you can access from http://www.jcreator.com.
And the other program is Microsoft Visual Studio. By it you can work on many languages. One of them is the newest C# which i will show examples later.
In this article i will give an example code in Java again.
import javax.swing.JOptionPane;
public class hmwrk4_1 {
public static void main (String[] args) {
System.out.println("Feet Meters\n---- ------");
for(double i=1.0; i<=10.0; i++) {
double meter=footToMeter(i);
if(i==10.0) {
System.out.println(i+" "+meter); }
else System.out.println(i+" "+meter); }
System.out.println("\nMeters Feet\n------ ----");
for(double i=20.0; i<=65.0; i+=5){
double foot=meterToFoot(i);
String s1=String.valueOf(foot);
if(foot>99.999){
String s2=s1.substring(0,7);
System.out.println(i+" "+s2); }
else{ String s2=s1.substring(0,6); System.out.println(i+" "+s2); } } }
public static double footToMeter(double foot){
double meter=0.305*foot;
return meter;}
public static double meterToFoot(double meter){
double foot=meter/0.305; return foot;}}
In comment you can write on what the program does. I will add it on the article later
