User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 27 Aug 2002, 10:16   #1
wu_trax
Guest
 
Posts: n/a
advatages java compared to php

hi, i have to give a presentation about a project to the custumer today
the project was a webapplication, or in fact just a database-frontend, we realized this whole thing with java and jsps
we didnt have any knowledge about php (and still dont), but im quite sure that someone will ask why we didnt use php
to be honest, we didnt, because noone wanted to get started with phpo for such an unimportant project, but ofc, i cant tell this to the customer, so i seriously need some (useable) advatages of java to php
i dont know much about php, so i cant make up anything on my own
php is not compiled and therefore also platform-independent, isnt it?
  Reply With Quote
Unread 27 Aug 2002, 10:41   #2
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
I doubt you will be able to use Java, as the language requires you to know what the 'period' or 'full stop' button does.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 27 Aug 2002, 11:44   #3
seahawk
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay
I doubt you will be able to use Java, as the language requires you to know what the 'period' or 'full stop' button does.
Biggest advantage in my eyes in javaservlets is that you can have a "state" kind of thingy:

In php we often get the stuff from a db on every pageload from a db or a file.

A java servlet doesnt "die" as a php-page does between page loads so you can let the data be a variable in the servlet and then avoid the dataloading on several pagerequests.

But this advantage is only beneficial in very specific situations though, as it wont have much impact on most situations!

Another advantage could be that java is IMHO a "nicer" language - where php is designed more with the "quick-and-dirty" solution in mind(nothing bad about this - we often like the quick and dirty way! ). The costumer benefit of this is cleaner code that are easier maintainable for people not being the original coders - so if they arent happy with you guys, you are easier to replace!

It might at first sound like a bad plan to make yourself replaceable, but my experience is that costumers generally will like you for this and therefore be less likely to replace you!

Seahawk

Seahawk
  Reply With Quote
Unread 27 Aug 2002, 12:15   #4
wu_trax
Guest
 
Posts: n/a
thank a lot, i think i can make something out of that
we have such a very specific situation (they wanted the keys of the db-entires in a special form, so we didnt get along with simply autogenerating keys).
i didnt know thats not possible with php, i guess i have to start learning that language aswell
about the 2nd point:
we are just students who made this small application for a city authority as a part of our studies, so we have in fact to be replaceable, because noone plans to work for that city in the future
so this was in fact a perfect answer, thanks again
  Reply With Quote
Unread 27 Aug 2002, 14:34   #5
Tweakster
I'm back baby!
 
Join Date: Aug 2001
Location: Minneapolis, MN
Posts: 22
Tweakster is an unknown quantity at this point
There is always the

"We offer jsp solutions"

route. Most people offering a trade don't offer it in 10 different languages, do they? Its not exactly needed, if you made them something good with the technology you know, sell that :-).
__________________
-Tweakin
Tweakster is offline   Reply With Quote
Unread 27 Aug 2002, 17:27   #6
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by seahawk
Biggest advantage in my eyes in javaservlets is that you can have a "state" kind of thingy:

In php we often get the stuff from a db on every pageload from a db or a file.

A java servlet doesnt "die" as a php-page does between page loads so you can let the data be a variable in the servlet and then avoid the dataloading on several pagerequests.
I would suggest you know neither PHP or JSP particularly well.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 27 Aug 2002, 22:48   #7
seahawk
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay

I would suggest you know neither PHP or JSP particularly well.
Would you care to elaborate?
With a silly comment like that i will definately not learn something new!

Seahawk
  Reply With Quote
Unread 27 Aug 2002, 23:58   #8
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
Quote:
Originally posted by seahawk

With a silly comment like that i will definately not learn something new!
You have mistaken Jeekay for a teacher.
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 28 Aug 2002, 00:12   #9
wu_trax
Guest
 
Posts: n/a
ok, already fiinished, noone asked one single stupid question :/ all for nothing, but at least i know now if someone asks me in the future
btw, not that anyone cares, but the good thing that came out of this is even after we wrote everything in easy to read java, we are not replaceable, because noone there has any idea of java, and now they offer us money for support \o/
so far we havent seen a single cent, because the whole thing was only for uni etc. but now they changed the requirments, so that our application cant be use anymore, at first when i heared that i was kinda shocked, all the work for nothing, but now, if i can get some money out of it, it makes me feel even better
  Reply With Quote
Unread 28 Aug 2002, 09:14   #10
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by MT
You have mistaken Jeekay for a teacher.
You are discriminating against my 'holier-than-thou' superiority complex. I'll see you in Courts !
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 11:58   #11
seahawk
Guest
 
Posts: n/a
Quote:
Originally posted by MT


You have mistaken Jeekay for a teacher.
Nah... He's just a troll...

Seahawk
  Reply With Quote
Unread 28 Aug 2002, 12:08   #12
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by seahawk
Nah... He's just a troll...
I fail to see how your lack of knowledge makes me a troll. Please explain.

PS: Your nick is display just to the left of your post. No need to show us it twice, is there?
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 12:14   #13
Idi
Guest
 
Posts: n/a
php stands for Phenominally Hard Programming, JAVA doesnt stand for anything, its another word for coffee.

As far as I can tell, (I only know how to program in mIRCscript so you'll have to bare with me) PHP is much better than JAVA, as it is harder so you can look really impressive to the newbies, and (most importantly) how the hell do you code something with coffee? Do you use some kind of coffee beans? Or small sachets of coffee to build upon?
  Reply With Quote
Unread 28 Aug 2002, 12:16   #14
Idi
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay


I fail to see how your lack of knowledge makes me a troll. Please explain.

PS: Your nick is display just to the left of your post. No need to show us it twice, is there?
you cant even write a ****ing decent irc bot so **** off ****!!!
  Reply With Quote
Unread 28 Aug 2002, 12:21   #15
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by Idi

you cant even write a ****ing decent irc bot so **** off ****!!!
I never claimed I was competent!
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 13:36   #16
seahawk
Guest
 
Posts: n/a
Here we go...

Quote:
Originally posted by Jeekay

I fail to see how your lack of knowledge makes me a troll. Please explain.


I fail to see how YOUR lack of knowledge makes me less knowladgeble... As far as I am concrened you have given no evidence whatsoever that you know anything about the topic of this thread!

Quote:
PS: Your nick is display just to the left of your post. No need to show us it twice, is there?
Exactly the same reason as we have to look at your 5 line sig with absolutely no relevence to this topic...

But enough of this - your last post here only proves my first point...

Seahawk
  Reply With Quote
Unread 28 Aug 2002, 14:24   #17
Caesar2
Commander
 
Caesar2's Avatar
 
Join Date: Sep 2001
Location: Netherlands
Posts: 146
Caesar2 is just really niceCaesar2 is just really niceCaesar2 is just really niceCaesar2 is just really nice
Quote:
Originally posted by wu_trax
ok, already fiinished, noone asked one single stupid question :/ all for nothing, but at least i know now if someone asks me in the future
btw, not that anyone cares, but the good thing that came out of this is even after we wrote everything in easy to read java, we are not replaceable, because noone there has any idea of java, and now they offer us money for support \o/
so far we havent seen a single cent, because the whole thing was only for uni etc. but now they changed the requirments, so that our application cant be use anymore, at first when i heared that i was kinda shocked, all the work for nothing, but now, if i can get some money out of it, it makes me feel even better
from my experience as student the customer never uses it neway
__________________
Quote:
Originally posted by Cochese
Cathaar are not overpowered.

You were just "bashed", live with it.
Caesar2 is offline   Reply With Quote
Unread 28 Aug 2002, 14:30   #18
Idi
Guest
 
Posts: n/a
Quote:
Originally posted by seahawk
concrened
'concerned'
  Reply With Quote
Unread 28 Aug 2002, 14:34   #19
wu_trax
Guest
 
Posts: n/a
Quote:
Originally posted by Idi
php stands for Phenominally Hard Programming, JAVA doesnt stand for anything, its another word for coffee.

As far as I can tell, (I only know how to program in mIRCscript so you'll have to bare with me) PHP is much better than JAVA, as it is harder so you can look really impressive to the newbies, and (most importantly) how the hell do you code something with coffee? Do you use some kind of coffee beans? Or small sachets of coffee to build upon?
yes, i did use java beans
  Reply With Quote
Unread 28 Aug 2002, 14:58   #20
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
Quote:
Originally posted by seahawk
...
Exactly the same reason as we have to look at your 5 line sig with absolutely no relevence to this topic...
...
The sig shows the high regard I hold for Jeekay, his abilities and his knowledge, and therefore is utterly relevant. Please stop trolling GK, admit you made a ballsup of your original post, and that GK is right and I will forgive you. ta.
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 28 Aug 2002, 15:26   #21
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by seahawk
I fail to see how YOUR lack of knowledge makes me less knowladgeble... As far as I am concrened you have given no evidence whatsoever that you know anything about the topic of this thread!

Exactly the same reason as we have to look at your 5 line sig with absolutely no relevence to this topic...
I cba to do the individual quoting thing so bear with me here.

1) No.

2) You don't. Like me, you could simply go to your profile and deselect the 'View Signatures' option. I got tired of them so I turned them off. I can't turn off your manual sigging. See the difference? Well done.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 17:20   #22
Tweakster
I'm back baby!
 
Join Date: Aug 2001
Location: Minneapolis, MN
Posts: 22
Tweakster is an unknown quantity at this point
Yes, we must all give seahawk static because he tries to be somewhat personal by typing his name at the end of his post on an online forum. Clearly he should be shot.

In my experiance, it is far better to ignore Jeekay's posts on these particular forums (bar his current challenge), this is strictly to keep your sanity in tact while his extremely over active ego is at work.

As a side note, every php question I have ever asked Seahawk he answered correctly.
__________________
-Tweakin
Tweakster is offline   Reply With Quote
Unread 28 Aug 2002, 18:13   #23
seahawk
Guest
 
Posts: n/a
Quote:
Originally posted by Tweakster

In my experiance, it is far better to ignore Jeekay's posts on these particular forums (bar his current challenge), this is strictly to keep your sanity in tact while his extremely over active ego is at work.
Heh - well... I have found the ignore feature of the boards...
  Reply With Quote
Unread 28 Aug 2002, 18:27   #24
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by Tweakster
Yes, we must all give seahawk static because he tries to be somewhat personal by typing his name at the end of his post on an online forum. Clearly he should be shot.

In my experiance, it is far better to ignore Jeekay's posts on these particular forums (bar his current challenge), this is strictly to keep your sanity in tact while his extremely over active ego is at work.

As a side note, every php question I have ever asked Seahawk he answered correctly.
Since I'm bored, I will actually post something other than 'you are wrong'.

JSP's are compiled (usually at runtime) into servlets that the servlet container (ie tomcat) loads and runs as and when appropriate (ie when a request for a given page is made). The instantiated servlets themselves are not static, neither are they kept in memory when the request is finished. They *can* be (using fx a singleton pattern), but not necessarily. This is why his point #1 was wrong.

I really dont know where this BS about PHP not having sessions came from. JSP/servlets have the 'session' implicit object which contain session information. PHP has the session_*() functions to setup/interact with/teardown sessions. Both JSP and PHP can maintain these sessions using either cookie style management, or GET sessionid style management - there really is no difference here.

So now that I have successfully rebuked the original answer, I shall return to my trolling. Good day.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 18:54   #25
Tweakster
I'm back baby!
 
Join Date: Aug 2001
Location: Minneapolis, MN
Posts: 22
Tweakster is an unknown quantity at this point
Quote:
Originally posted by Jeekay


Since I'm bored, I will actually post something other than 'you are wrong'.

JSP's are compiled (usually at runtime) into servlets that the servlet container (ie tomcat) loads and runs as and when appropriate (ie when a request for a given page is made). The instantiated servlets themselves are not static, neither are they kept in memory when the request is finished. They *can* be (using fx a singleton pattern), but not necessarily. This is why his point #1 was wrong.

I really dont know where this BS about PHP not having sessions came from. JSP/servlets have the 'session' implicit object which contain session information. PHP has the session_*() functions to setup/interact with/teardown sessions. Both JSP and PHP can maintain these sessions using either cookie style management, or GET sessionid style management - there really is no difference here.

So now that I have successfully rebuked the original answer, I shall return to my trolling. Good day.
There, now was that so hard?
__________________
-Tweakin
Tweakster is offline   Reply With Quote
Unread 28 Aug 2002, 18:58   #26
wu_trax
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay

JSP's are compiled (usually at runtime) into servlets that the servlet container (ie tomcat) loads and runs as and when appropriate (ie when a request for a given page is made). The instantiated servlets themselves are not static, neither are they kept in memory when the request is finished. They *can* be (using fx a singleton pattern), but not necessarily. This is why his point #1 was wrong.
jsps are compiled into servelts, but only once (unless you change something)
all attributes of a servlet keep their value as long as the server runs, i know, because i used that feature and it worked without any singelton pattern

and why the hell did you people ruin my thread?
  Reply With Quote
Unread 28 Aug 2002, 19:02   #27
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by wu_trax

jsps are compiled into servelts, but only once (unless you change something)
all attributes of a servlet keep their value as long as the server runs, i know, because i used that feature and it worked without any singelton pattern
They are only compiled once. This does not mean they are kept instantiated all the time.
Were you making use of the session implicit object lots?
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 19:06   #28
wu_trax
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay


They are only compiled once. This does not mean they are kept instantiated all the time.
Were you making use of the session implicit object lots?
no, it doesnt the one thing doesnt have anything to do with the other, but all attributes you defined keep their value as long as the server runs, that is a fact. what do you think this jsp_init / init-methods are there for?
and i dont see how sessions are related to this point
  Reply With Quote
Unread 28 Aug 2002, 19:32   #29
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by wu_trax

no, it doesnt the one thing doesnt have anything to do with the other, but all attributes you defined keep their value as long as the server runs, that is a fact. what do you think this jsp_init / init-methods are there for?
and i dont see how sessions are related to this point
1) I know. I was pointing out this flaw in your original arguement.

2) Read up.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 19:48   #30
wu_trax
Guest
 
Posts: n/a
where did i write that they are realated? i answered to the two things you wrote in your post before.
noone but you wrote anything about sessions, this has nothing at all to do with the fact that servlets 'live' as long as the server is on
now please get out of my ****in thread
  Reply With Quote
Unread 28 Aug 2002, 20:15   #31
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by seahawk
Biggest advantage in my eyes in javaservlets is that you can have a "state" kind of thingy:

In php we often get the stuff from a db on every pageload from a db or a file.

A java servlet doesnt "die" as a php-page does between page loads so you can let the data be a variable in the servlet and then avoid the dataloading on several pagerequests.
Please explain to me how maintaining state across multiple requests is not 'a session'.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 28 Aug 2002, 21:13   #32
seahawk
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay

Please explain to me how maintaining state across multiple requests is not 'a session'.
Session is for a single user - maintaining state in a servlet isnt!

And I never said that php doesnt have sessions...

Quote:
A java servlet doesnt "die" as a php-page does between page loads so you can let the data be a variable in the servlet and then avoid the dataloading on several pagerequests.

But this advantage is only beneficial in very specific situations though, as it wont have much impact on most situations!
A session in php is stored on disk - a static variable in a servlet isnt - THIS is the point I was explaining in my original reply, but you obviously cant read english... OR you are a troll - suit yourself...

And I have no idea where all your JSP arguments came from.. I have never comented on JSP - only on java servlets, as I have no knowledge of JSP, but some of servlets(have done a few myself).

And in the java servlets I have done, I have been able to store content in a variable instead of using a session on disk as I would do in php...
  Reply With Quote
Unread 28 Aug 2002, 22:33   #33
thaisi
Guest
 
Posts: n/a
Heh, pretty cool discussion.

I think it really depends on the problem (site use)

PHP is good to create a quick website with some Database usage and session/user stuff.

But I found out that for really big sites JAVA is a better solution. I think a lot of people don't know me over here, but I'm the main website builder of the TFD alliance (since TFD was founded) and working on the new TFD website for quite some time. We started of in PHP, but since we wanted the new website to focus on a lot of things (good object oriented code, dynamic skins, modular structure) PHP started to lose it. On every pagerequest all classes needed to be parsed, and XML and text processing wasn't that quick. We managed to speed things up with caching a lot of things in the DB and stuff, but still things were going slow pretty fast and we missed the strict type thing. If a developer changed a thing in area X, things would suddenly fall apart in area Y (and only detectable in runtime, thus could be discovered late). Now we work with the JAVA Servlet structure, and it has really great advantages:
- Better Object Oriented environment (Exceptions, Interfaces, Classloading)
- Great libraries already available
- Great XML and text processing
- Compiling, so changes can be done at once throughout the entire system. Also JAVA Doc is a great advantage since we are working with more people at once.

So with big sites I would say JAVA > PHP, and with the quick and simple sites I would choose PHP > JAVA.
  Reply With Quote
Unread 29 Aug 2002, 00:12   #34
wu_trax
Guest
 
Posts: n/a
Quote:
Originally posted by seahawk
And I have no idea where all your JSP arguments came from.. I have never comented on JSP - only on java servlets, as I have no knowledge of JSP, but some of servlets(have done a few myself).
like Jeekay correctly said, JSPs are servlets, there is no difference in the end, you just write them different
(you put some java-code in a html-document and save it as .jsp, out of that file your container generates a 'normal' servlet and compiles it. there ar some other things like tag-libaries, javabeans etc. but in the end it all just normal java-commands and you can do anything also with normal servlets)

@ thaisi: i still dont understand this whole xml-thingy, i have some very basic knowledge about xml (read: i know what a well-formed and valid xml-file is) and i know a little about java, but i dont understand for what i could bring these two things together.
i used this build-tool called ant once. it requires an xml-file that specifies in what order to compile java-files, where to put the compiled files, what else to do, etc. but i still dont know how i can use this whole xml-idea, so if you have some free time it would be nice if you tell a little more about your website / what you use xml for
  Reply With Quote
Unread 29 Aug 2002, 18:16   #35
Nodrog
Registered User
 
Join Date: Jun 2000
Posts: 8,476
Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Quote:
Originally posted by wu_trax


@ thaisi: i still dont understand this whole xml-thingy, i have some very basic knowledge about xml (read: i know what a well-formed and valid xml-file is) and i know a little about java, but i dont understand for what i could bring these two things together.
i used this build-tool called ant once. it requires an xml-file that specifies in what order to compile java-files, where to put the compiled files, what else to do, etc. but i still dont know how i can use this whole xml-idea, so if you have some free time it would be nice if you tell a little more about your website / what you use xml for
Its generally used for transferring data. For example, if you had a 'person' object, you could transfer it as
Code:
<person>
  <name>John Smith</name>
  <occupation>Student</occupation>
  <address>
    <country>Britain</country>
    <city>London</city>
  </address>
</person>
or whatever

The XML parser on the other end can then read the datafields easily, and do whatever it wants with them.
Nodrog is offline   Reply With Quote
Unread 29 Aug 2002, 19:21   #36
wu_trax
Guest
 
Posts: n/a
what is the advantage to 'normal' databases?


(i guess i should just read this book a bought a while ago )
  Reply With Quote
Unread 29 Aug 2002, 19:27   #37
Nodrog
Registered User
 
Join Date: Jun 2000
Posts: 8,476
Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Nodrog has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Quote:
Originally posted by wu_trax
what is the advantage to 'normal' databases?


(i guess i should just read this book a bought a while ago )
Youre looking at it from the wrong angle. Think of it in terms of transferring data between 2 different computers over a network, or between 2 applications.

The main advantage is that the data is self-describing.
Nodrog is offline   Reply With Quote
Unread 29 Aug 2002, 22:21   #38
Sally
Yo' Bitch
 
Join Date: Nov 2000
Posts: 22
Sally is an unknown quantity at this point
Quote:
Originally posted by Idi
JAVA doesnt stand for anything, its another word for coffee.
Just Another Vague Acronym.

Sally
__________________
How come when I do it it's Newbie Bashing, but when they do it then it's Tactical Elimination of Possible Future Threats?
Sally is offline   Reply With Quote
Unread 30 Aug 2002, 00:37   #39
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
XML is not a competitor to a database

I dislike XML.
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 30 Aug 2002, 01:35   #40
Jester
Pedantic hypocrite
 
Jester's Avatar
 
Join Date: Jan 2001
Location: Back and to the left
Posts: 1,488
Jester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond reputeJester has a reputation beyond repute
Quote:
Originally posted by MT
XML is not a competitor to a database

I dislike XML.
Why?

Jester
__________________
I always wanted to be a dancer, but I could never get the shit off my shoes
.......
Jester is offline   Reply With Quote
Unread 30 Aug 2002, 11:40   #41
thaisi
Guest
 
Posts: n/a
we use XML as storage format in files.
We have all sorts of datafiles we use like configuration files and skinfiles. Skinfiles are a files that describe how a certain part of the site (like forms) should be displayed.

A help page of how to do this (dutch!):
http://anonymous.servicez.org/users/...php?viewPage=2

The datafile of such a skin would look like this:
http://anonymous.servicez.org/users/...ourse/form.xml

In Java we can read those files very easily.

we use XML as configuration files (just like that build file used in ANT)
like:
Code:
<server>
	<name>Spider</name>
	<host>serverhost.fryingdutch.net</host>
	<resources>G:/projects/tfd-xp/resources</resources>
	<project-root>G:/projects/tfd-xp/</project-root>
	<deamon>
		<deamon-class>net.fryingdutch.util.net.HttpDeamon</deamon-class>
		<init-param>
			<param-name>online-root</param-name>
			<param-value>tfd-xp/</param-value>
		</init-param>
		<init-param> 
			<!-- bij projecten kan de project root en de online root verschillen! 
				hier toevallig niet, maar een aparte disk-root is wel noodzakelijk.
				(je kan een project hebben met een aparte http/ dir, dat de online root dus een directory hoger ligt!
			-->
			<param-name>document-root</param-name>
			<param-value>G:/projects/tfd-xp/</param-value>
		</init-param>
		<init-param>
			<param-name>port</param-name>
			<param-value>8080</param-value>
		</init-param>
	</deamon>
	<deamon>
		<deamon-class>net.fryingdutch.util.sql.mysql.MySqlDeamon</deamon-class>
		<init-param>
			<param-name>parser</param-name>
			<param-value>net.fryingdutch.util.sql.parsers.XmlMySqlDeamonParser</param-value>
		</init-param>
		<init-param>
			<param-name>xml-file</param-name>
			<param-value>resources/net/spider/mysql-deamon.xml</param-value>
		</init-param>
	</deamon>
</server>
or to describe how the database should look like: (so that the system can change or install it's own database

Code:
	<table>
		<name>passport</name>
		<column>
			<name>passportID</name>
			<type id="long" />
			<not-null>true</not-null>
			<auto-increment>true</auto-increment>
		</column>
		<column>
			<name>username</name>
			<type id="String">
				<length>40</length>
			</type>
			<not-null>true</not-null>
		</column>
		<index>
			<primary>true</primary>
			<column>passportID</column>
		</index>
		<index>
			<name>username</name>
			<unique>true</unique>
			<column>username</column>
		</index>
	</table>
we also use it to serialize classes into the database, and rebuilding them from XML (also that other systems could be an editor for a class because every system is able to write / output text (and thus XML))

soz for the spamm0r, but I hope I've given some good examples for the use of XML

And no, XML is not a competition against databases, databases have the task to store lots of data fast and efficient, and able to search particular data in a large dataset. XML on the otherhand is usefull to put data from one system to another, in a self eplanatory way. (like Nodrog said)
  Reply With Quote
Unread 30 Aug 2002, 12:19   #42
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
spammor is always good.

I see the benefits of XML, but I also see it as a "ooh we must use XML as its new and so cool" and people doing stuff in XML that just isnt worth it.

Java does have exquisite XML parsers tho ;) (ty apache)
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 30 Aug 2002, 13:36   #43
thaisi
Guest
 
Posts: n/a
well, it's quite cool actually, I mean it is simple, and you can do a LOT of things with it. But you must not look at it as a cure for everything ofcourse. It's a great markup standard to create documents to send over the internet, eg. XHTML. What te advantages are of XHTML above HTML is that 'X' It means that it is written in XML format, thus easy to process, and that it can hold other XML formats inside (XForms, XMath, actually anything that a future internet browser could support)

Note: I also had the feeling they were just hyping hot air, until I found many uses for XML. So I guess you just have to find a use for it and start working with it really to understand it 'power', hehe
  Reply With Quote
Unread 30 Aug 2002, 16:39   #44
wu_trax
Guest
 
Posts: n/a
Quote:
Originally posted by thaisi
Note: I also had the feeling they were just hyping hot air, until I found many uses for XML. So I guess you just have to find a use for it and start working with it really to understand it 'power', hehe
i still need to find an example to use it myself, else everything i read wont bring me any further.
i thought of writing a small web-application for a movie-database and use xml to seperate data and layout (just as an example to work with, a web application is pretty much useless if im not planning to publish my movie-db on the web )
to use it for the data itself should be no big problem, but i dont know how to use xml for input forms
  Reply With Quote
Unread 30 Aug 2002, 19:56   #45
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
One thing that has always made me curious about XML is people using it as a *storage* format instead of a transmission format. I mean come on.. you can either store '1' (1 byte) or
<SOME START TAG>
<BEGIN>
<DATA ROW>
<DATA ENTITY>
1
</DE>
</DR>
</BEGIN>
<END TAG>

OK so I am exagerating (a little), but you see the point. To be honest, my opinion is the same for transmission formats. Binary is soooooooooooo much more efficient for being passed around, and is usually much much easier to parse aswell (depending on your language of choice, of course).

What is it that is so special about XML that despite its inefficiency it is so popular? Other than then whiz-bang new toy effect.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Unread 30 Aug 2002, 21:47   #46
Nazca
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay


I never claimed I was competent!
If almost anyone else had said that you'd of flamed them, so can you flame yourself please
  Reply With Quote
Unread 1 Sep 2002, 09:13   #47
wu_trax
Guest
 
Posts: n/a
Quote:
Originally posted by Jeekay
One thing that has always made me curious about XML is people using it as a *storage* format instead of a transmission format. I mean come on.. you can either store '1' (1 byte) or
<SOME START TAG>
<BEGIN>
<DATA ROW>
<DATA ENTITY>
1
</DE>
</DR>
</BEGIN>
<END TAG>

OK so I am exagerating (a little), but you see the point. To be honest, my opinion is the same for transmission formats. Binary is soooooooooooo much more efficient for being passed around, and is usually much much easier to parse aswell (depending on your language of choice, of course).

What is it that is so special about XML that despite its inefficiency it is so popular? Other than then whiz-bang new toy effect.
maybe its faster if you just have to read the data in xml-format out of a database instead of converting it first
storage space is not that expenisve anymore

(not sure about that though)
  Reply With Quote
Unread 1 Sep 2002, 12:12   #48
Epcylon
Registered User
 
Join Date: Apr 2000
Location: Oslo, Norway
Posts: 78
Epcylon is a glorious beacon of lightEpcylon is a glorious beacon of lightEpcylon is a glorious beacon of lightEpcylon is a glorious beacon of lightEpcylon is a glorious beacon of light
Quote:
Originally posted by Jeekay
One thing that has always made me curious about XML is people using it as a *storage* format instead of a transmission format. I mean come on.. you can either store '1' (1 byte) or
<SOME START TAG>
<BEGIN>
<DATA ROW>
<DATA ENTITY>
1
</DE>
</DR>
</BEGIN>
<END TAG>

OK so I am exagerating (a little), but you see the point. To be honest, my opinion is the same for transmission formats. Binary is soooooooooooo much more efficient for being passed around, and is usually much much easier to parse aswell (depending on your language of choice, of course).

What is it that is so special about XML that despite its inefficiency it is so popular? Other than then whiz-bang new toy effect.
Binary saves space. That's all the advantages it has over XML really, and space isn't such a valued commodity anymore.

On the other hand... binary presents you with a few problems on it's own...

First, you have to remember to take byte-ordering into account when you want to use it.

Then you have to make sure everyone involved knows exactly where in the datablock they can the data that belongs to a certain variable. In other words, when you use binary, you have to describe the data somewhere, so that people can use it, while using XML, the data describes itself.

As someone said, if you don't need the advantages of XML, but do need the advantages of binary (or whatever you feel like), use the one that suits your purpose. XML is being hyped atm, but any levelheaded developer should do what he always does before starting a project. Take a step back, find the tools that are best suited for the job, and use those.

I believe XML will become very important in the future, as we are just beginning to see the patterns of where Information Technology will go... XML will be an integral part of IT in the years to come. (IMHO ofc )
__________________
Epcylon
[R1]: noob | [R2]: B8S/ICD | [R3-5]: ICD | [R6]: HR | [R7-9.5]: HR/NoS |
[R10]: HR RecOff | [R10.5]: HR RO -> HR HC -> HR pe0n | [R11]: HR pe0n -> Leave of Absence |
[R12]: HR free-pe0n | [R13-]: HR pe0n
Epcylon is offline   Reply With Quote
Unread 1 Sep 2002, 15:47   #49
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
Binary formats can be huge too, look at MSWord .doc or Java Serializables for examples. And they're inflexible, one of the major points of XML is that it's eXtendable so you can extend the format, for instance add extra comments for the user on where that figure of 1 came from. Compare this to a binary format like ID3 where it's not only unsuitable for most needs, it has to be rewritten many times (id3v1.1, id3v2) to make it useful.
queball is offline   Reply With Quote
Unread 1 Sep 2002, 18:49   #50
Jeekay
Jim Henson
 
Join Date: Aug 2001
Posts: 23
Jeekay is infamous around these partsJeekay is infamous around these parts
Quote:
Originally posted by queball
Binary formats can be huge too, look at MSWord .doc or Java Serializables for examples. And they're inflexible, one of the major points of XML is that it's eXtendable so you can extend the format, for instance add extra comments for the user on where that figure of 1 came from. Compare this to a binary format like ID3 where it's not only unsuitable for most needs, it has to be rewritten many times (id3v1.1, id3v2) to make it useful.
I quite agree - but then there are bad examples on both sides of the line.

I do feel though that a wel designed binary format can be extended to some degree - having a size specifier, for example, allows a program to easily capture the data it knows how to handle and simply ignore the rest of a given data item that it does not know what to do with.

Epcy - I quite agree again. I just still think that, while storage is something we now take for granted, bandwidth still is not.
__________________
Forever shall the wolf in me desire the sheep in you

[13:04:52] <MT> morning god
[13:05:01] <queball> morning antichrist
[13:05:30] <MT> you arent god!
[13:05:35] <MT> jeekay is god
Jeekay is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 09:37.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018