473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

eclipse: need example code, or any OO example code

I've downloaded and am now studying the Eclipse class libary. It looks
very elegant and well done. But as I am somewhat new to OO, I'd like
to see some example code. Documentation is thin, save that generated
by PHPdocs.

Can anyone show me some sample code? I'm mostly interested in how
other people set up their software - what objects call what objects?
What are other programmers doing in their web projects? Is it common
for people to mix OO and procedural code in their web projects? Those
who've gone the pure OO route, can I see the constructor for your main
object?
Jul 16 '05 #1
6 3025
"rush" <pi**@rush.avalon.hr> wrote in message
Where MySitePage defines, things that are common fro every page on your
site, UserPage adds things specific to the part of the site for users, etc..
You can also use classes to define components that get used on many pages,
like page counters, or menu.

You could find some simple examples of the pages on the TT page. (maybe I
will add some more describing some possible organizations of the app, it
sounds like a good idea).


I like the sound of your IDE, but what language is it in? Will it run
on a Windows PC?
Jul 16 '05 #2
"lawrence" <lk******@geocities.com> wrote in message
news:da**************************@posting.google.c om...
"rush" <pi**@rush.avalon.hr> wrote in message
I like the sound of your IDE, but what language is it in? Will it run
on a Windows PC?


IDE runs on windows, and let's you use and generate PHP 4.x code, and you do
not need anything speciall on the server besides regular html server with
PHP support.

On the windows development machine you will also need html server with php,
and Internet explorer if you would like to preview generated pages. The IDE
itself is written in Smalltalk (but this is just language it is implemented
in, like for instance your favouriute editor is perhaps implemented in C but
it lets you write php source code).

If youhave any further questions please do not hesitate to contact me,

rush
--
http://www.templatetamer.com/

Jul 16 '05 #3
"rush" <pi**@rush.avalon.hr> wrote in message news:<be***********@as201.hinet.hr>...
"lawrence" <lk******@geocities.com> wrote in message
news:da*************************@posting.google.co m...
"rush" <pi**@rush.avalon.hr> wrote in message
I've tried it out some. I like its complete listing of all functions
and classes. But it lacks certain basic text editing abilities, like
to indent a block of code.


hm.., you select the code and press the tab (or shift tab if you would like
to un-indent), if that is what you need? Also columl selection (rectangular)
can be done by holting an alt key and selecting with mouse. Maybe it is not
bad idea to add this to the faq.


Ah, I was looking around for a button or something. Thanks much. I'm
testing it out today. What is in the professional version?
Jul 16 '05 #4
"lawrence" <lk******@geocities.com> wrote in message
news:da**************************@posting.google.c om...
"rush" <pi**@rush.avalon.hr> wrote in message news:<be***********@as201.hinet.hr>... Ah, I was looking around for a button or something. Thanks much. I'm
testing it out today. What is in the professional version?


functionality wide it is a same thing, the only difference is that it does
not include promo dialog box for pro version, and it does not include TT
footer on the generated pages.

rush
--
http://www.templatetamer.com/

Jul 16 '05 #5
With total disregard for any kind of safety measures
lk******@geocities.com (lawrence) leapt forth and uttered:
I've downloaded and am now studying the Eclipse class libary. It
looks very elegant and well done. But as I am somewhat new to
OO, I'd like to see some example code. Documentation is thin,
save that generated by PHPdocs.

Can anyone show me some sample code? I'm mostly interested in
how other people set up their software - what objects call what
objects? What are other programmers doing in their web projects?
Is it common for people to mix OO and procedural code in their
web projects? Those who've gone the pure OO route, can I see the
constructor for your main object?


Are you referring to the Eclipse library by Vincent Oostindie?

Its not particularly hard to use as the Iterator and Database
classes work the same way across the board.

Heres an example using a MySQL database:

<?php

include_once('./MyDatabase.php');
include_once('./QueryIterator.php');

$db =& new MyDatabase('db_name', 'localhost');

if (!$db->connect('db_user', 'db_pass')) {
die('Database error: ' . $db->getErrorMessage());
}

$query =& $db->query('SELECT * FROM table');

if($query->isSuccess()) {
for($it =& new QueryIterator($query); $it->isValid(); $it->next()) {
$data =& $it->getCurrent();
echo $data['column_name'];
}
} else {
die('Query error: ' . $query->getErrorMessage());
}

?>

Using the array iterator is the same sort of thing:

<?php

include_once('./ArrayIterator.php');

$array = $_SERVER; // Just as an example

for($it =& new ArrayIterator($array); $it->isValid(); $it->next()) {
$data =& $it->getCurrent();
echo $data['key'];
}

?>

--
There is no signature.....
Jul 16 '05 #6
Phil Roberts <ph*****@HOLYflatnetSHIT.net> wrote in message
A good place to go to pick up information about the Eclipse library
is http://sitepointforums.com/, as until recently the author was a
fairly regular poster there. Heres one particular thread where he
goes into a lot of detail about OOP in general and throws some
examples from Eclipse into the mix:

http://sitepointforums.com/showthrea...threadid=59898


Outstanding information on that page, especially by the Eclipse
author. I find that looking at the code of Eclipse is like getting a
free education in truly good OOP thinking. I often have trouble
reading other people's code, but his code is unusually simple and
elegant.

Thanks for the tip.
Jul 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
IDE
by: Thomas Lindgaard | last post by:
Hello I am probably going to start a war now... but so be it :) I just want to hear what all you guys who eat pythons for breakfast use for python coding. Currently I use Kate, but I would...
4
by: gamaron | last post by:
Summary --------- I'm looking for a C++ IDE. If I'm going to learn something, I prefer it to be free-of-charge (preferably and open-source base), extensible (read: language independent,...
5
by: Matt Silberstein | last post by:
I anyone using Eclipse? If so, can you give me a clue to get started. I keep reading about how good an IDE it is, but it does not seem to help with Web stuff (CSS/HTML/JavaScript). I downloaded a...
2
by: coachhilton | last post by:
Greetings, I have a large existing C++ code base that I want to work with in the Eclipse IDE. However, try as I might, I cannot figure out how to compell Eclipse to import the code base into a...
16
by: Amir Michail | last post by:
Hi, It seems to me that measuring productivity in a programming language must take into account available tools and libraries. Eclipse for example provides such an amazing IDE for java that it...
0
by: Husey | last post by:
Hi, I am trying to create a very simple EJB project which requires me to create a new jboss configuration in Eclipse. I keep getting the error message "An error has occurred. See error log for...
5
by: iu2 | last post by:
Hi all, I'll realy appreciate your help in this: I read data from a database containg Hebrew words. When the application is run from IDLE a word looks like this, for example: \xe8\xe9\xe5 ...
9
by: Mirko Kralj | last post by:
Hi to all, I was trying out the Eclipse PDT IDE and I'm impressed. I just want to know about the development logic you are using with this IDE. For example, I installed AppDev and configured...
1
by: Harris Kosmidhs | last post by:
Hello, I recently installed eclipse with the php plugin. My question is: can eclipse be used in a medium size site where php file include others? Or when you use an MVC approach. To be more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.