Archive

Posts Tagged ‘database’

Too much to do, so little time, so freakin lazy, and I’m going crazy.

June 24, 2012 2 comments

It’s been forever since I last  worked on my pet project, It’s like 2 weeks, its probably because I’m adjusting to my new schedule and school stuff, plus I needed a rest it’s been two months since I last slept well because of my work, and I really needed a break.

While I’m on break I always think of a ways to get closer to coding, lol in my mind there are a lot going on, I can’t focus on one things because I’m too busy thinking other stuff. It’s like walking in a strange place and doesn’t give a damn on new things I see, for example there are a lot of new faces I see in the campus, including freshman chx, but I didn’t gave a damn. I’m thinking of a lot of things that I feel like my brain is about to explode, and thats a bad sign.

Anyways first week of schooling is awful almost all of my colleagues are busy on their OJT and its like I’m out of place. I don’t have anywhere to hangout except the INTERNET cafe and it sucks because I had to spend 60 pesos just to passed 4 hours of time so I can go home in the afternoon. and I don’t really have a choice so ya.

Actually I had a choice, I could go to the new library at our campus but the question is what the hell am I gonna do in there. I’m even lazy enough to work on my project and its like forcing me to study 4 hours just to passed time and thats fucked up. Now I missed working, school is really boring. Work is fun because you receive money by doing what you love and that’s something everybody wants.

Anyways last few days, something came up after I woke up,  EUREKA!!!!

I decided that to get me started on coding again, I though of learning Object Oriented Programming on PHP. It’s useful because I’m working on my Web App and its a good plus if I have also knowledge in OOP.

What I did in order to get started in studying OOP, I have to do a quick research on what is OOP. Then I found out that I already took this or familiar with OOP, it’s is included on ICT121 Data Structions, the typedef student struct(){} thingy if you still remember. And Sir Victor Lapin an application developer also taught me some techniques in OOP and that gave me idea about OOP.

Anyways it turns out that the concepts is quiet hard, I have to do several trials so that I can grasp the idea and then created my own OOP and added it to my pet project.  At the end of studying I came up with this codes.

?php
class Database {
public $host = "localhost";
public $username = "root";
public $password = "";
public $database = "InventorySystem";

public function __construct() {
$this-->

public function MysqlCheckConnection() {

/**

* @desc Check if the mysql_connect is succesful or not.

*/

if (!mysql_connect($this->host, $this->username, $this->password)) {

die("Cannot connect to <a class="zem_slink" title="Database" href="http://en.wikipedia.org/wiki/Database" target="_blank" rel="wikipedia">Database</a>, please fix Connection/ folder.");

} else {

return true;

}

}

public function MysqCheckSelection() {

/**

* @desc Check if there is a database to select.

*/

if (!mysql_select_db($this->database)) {

die("Cannot select a Database, Database $this->database does not exist please fix Connection/ folder.");

} else {

return true;

}

}

}

$connect = new Database();

It’s really great because I have discovered new perspective in programming, I can now create custom functons and define what specific commands I would implements.

So overall its really fun learning OOP, though I only learned the basics, I will push through and continue to moderate level of OOP.

The above codes is my codes in connecting to the database, though its not that necessary to OOP that db connection but I feel like it and its cool!

Quick Update:

I’ve started on my InventorySystem, I will post its repository in my next post probably this week because I had to complete its interface.

I will also edit the source code page and put links to my github account for those who wants to develop the site further.

Peace!

Bits And Pieces of The Application

April 24, 2012 4 comments

Yesterday we presented the overview of the application plan. Now we will try to explain each of them and the intents of each of the Activity(Pages). We will start on the SplashScreen Activity:

public class SplashScreen extends Activity() 

This here when the user click the icon the first thing that will happen to the application, it will show the logo, title and the version of the application. Usually SplashScreen isn’t really that necessary because we can operate even though it is disable, We will  implemented it for the purpose of beautifying the application. This is the first thing that I will do since it only takes few codes the work.

public class MenuMain extends Activity()

After the SplashScreen this is the next thing that will happen to the application it will direct the the MainMenu Activity . There is a lot of ways to implement menus but since we are aiming for simplicity we will just use buttons. Buttons are great for everything when you get used to it, a whole new world of ideas you will discover. Maybe for the future projects we will use the more advance method of menus like widgets.

 public class CalculatorMain extends Activity()
public class SciCalculatorMain extends Activity() 

 This is where all the magic happens this is where the core of the application is, we will codes together on this area more often debug stuff and shit. Since it needs to have a database to store the last 5 equations, we will have a research on SQLite platform on Android since we don’t have any idea on how to implement it or try to see if there is any other solution rather implementing the SQLite.

public class AboutApp extends Activity()

We will put in here the ones who help contribute to the project, the one who is supporting it and making this impossible stunt possible. We will get famous in no time guys. haha

Thats it for now,  tomorrow I will probably create the visual images of the application and take a screenshot and show it to you guys, I will also show you how to make the UI its as easy as 123 trust me.

BTW naa nay ni sign up isa ka bouk for the Designs sa application lamats kaayo bai, due to his request dili sya paila hehehe

Regards,
Bryan

Database I Presentation Slideshow, Database Management

June 18, 2011 Leave a comment
%d bloggers like this: