473,230 Members | 1,719 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,230 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 3021
"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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.