Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-01

Web language

22 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

VisionForce

I'm going to create my own server-side web language, and I was thinking about using .NET. Does anyone here have any good reasons I should use Delphi instead? Is there a place I can go to learn Delphi's string parsing functions? Does Delphi support Serialization. What about Polymorphism?

Please, no opinions, just facts. Thanks.

Sincerely,
Alex C. Barberi
VisionForce
http://www.visionforceweb.com

Reply by email

Daniël Mantione
to VisionForce

Op Thu, 26 Jan 2006, schreef VisionForce:

Show quoted text 5 lines
I'm going to create my own server-side web language, and I was thinking about using .NET. Does anyone here have any good reasons I should use Delphi instead? Is there a place I can go to learn Delphi's string parsing functions? Does Delphi support Serialization. What about Polymorphism?

2/3 of the web servers runs Linux. Only about 20% runs Windows. By limiting yourself to the Windows platform you will throw away the majority of your potential users. Do not think Mono can save you; care should be taken your program will actually run on it, but more important, network administrators will not install the Mono framework on their webservers.

... which is an obstacle for Windows as well; you will require your users to install a very large framework which they do not like to download. Even if they have it installed it will use a lot of memory, tens of megabytes. Users will not like that.

.NET is a 32 bit virtual machine. You will miss the 64 bit revolution. It is quite likely that within 2-3 years, 50% of the systems will run a 64 bit operating system.

.NET is also slow, but performance is usually not really important for web languages. However, if you want websites written in your language to survive Slashdotting, you might keep performance in mind.

So, you should use a language that runs both on Windows and Linux, and Free Pascal is a good choice. Delphi can help as well, but you should write your code so that it can be compiled by both compilers. About langauge features: serialization of what? polymorphism of what? OOP? Of course you can do that.

Lastly, the most important reason: If you use .NET, your code is obsolete when Microsoft decides it is, history learns this is every 5-10 year. Pascal code is much more durable.

Daniël

Reply by email

Michael Van Canneyt
to VisionForce: I'm going to create my own server-side web language, and I was thinking about using .NET.…
VisionForce wrote 6 lines
I'm going to create my own server-side web language, and I was thinking about using .NET. Does anyone here have any good reasons I should use Delphi instead? Is there a place I can go to learn Delphi's string parsing functions? Does Delphi support Serialization. What about Polymorphism? Please, no opinions, just facts. Thanks.

Simple:
.NET will restrict you to Windows, and this is by far the minority of webservers. Mono is a nice attempt, but I don't know many people that will install the mono runtime engine on a webserver, it puts a big load on your server, and is not really performant. For GUI this does not matter, but for a busy webserver it does. I write client/server apps for a living, and refrain from using such runtime engines (be it Java or .NET).

As for string functions: look at the documentation of the strutils and sysutils units, then you have an idea of what is possible. There are various regular expression units floating around for Delphi/FPC, FPC comes standard with one.

Serialization is a standard feature of Delphi and FPC, and polymorphism is a standard OOP construct, and hence is part of Delphi/FPC.

Michael.

Reply by email

Felipe Monteiro de Carvalho
to VisionForce: I'm going to create my own server-side web language, and I was thinking about using .NET.…
VisionForce wrote
Is there a place I can go to learn Delphi's string parsing functions?

Free Pascal RTL documentation is very good:

http://www.freepascal.org/docs-html/rtl/sysutils/index.html http://www.freepascal.org/docs-html/rtl/system/index.html http://www.freepascal.org/docs-html/rtl/

This website has even better docs with examples of *every* function: http://www.delphibasics.co.uk/ByFunction.asp?Main=Strings

If you cannot find something, you an always google for: Delphi + the word you are looking for

And ask here if you cannot find on any of the above.

What about Polymorphism?

I don't know much about Polymorphism, but I was recently talking to Florian and he says Yes, it does support Polymorphism.

Felipe Monteiro de Carvalho

Reply by email

VisionForce

You gave me this link:
http://www.delphibasics.co.uk/ByFunction.asp?Main=Strings Are these methods supported by FreePascal, or would I need to be using Lazarus (Delphi)?

Thanks again for all your help.

Alex C. Barberi
VisionForce
http://www.visionforceweb.com

Earlier message 32 lines
----- Original Message ----- From: "Felipe Monteiro de Carvalho" To: "VisionForce" Sent: Sunday, January 29, 2006 11:54 AM Subject: Re: [fpc-devel] Web language On 1/27/06, VisionForce wrote: > Thanks Felipe. You are welcome =) This really might be a good experience to learn. > 1) Serialization is saving the information stored in a class into a > binary, > SOAP, XML or other file format. XML is fully supported. SOAP is a w3c specification, so it should be easy to interface with it. There is a unit called DOM that you can use to access XML. > 2) Polymorphism covers things likes overloading and overriding methods, > creating interfaces, and other such OOP related items. overriding and interfaces are also supported. You can learn about this here: http://www.delphibasics.co.uk/Article.asp?Name=OO -- Felipe Monteiro de Carvalho

Reply by email

L505
to Daniël Mantione

Op Sun, 29 Jan 2006, schreef VisionForce:

You gave me this link: http://www.delphibasics.co.uk/ByFunction.asp?Main=Strings Are these methods supported by FreePascal, or would I need to be using Lazarus (Delphi)?

And in addition to Daniel's comment, the documentation for these units for FPC is more thorough even than the Delphi documentation and a lot easier to find on google, which is here:

http://www.freepascal.org/docs-html/rtl/sysutils/index-5.html http://www.freepascal.org/docs-html/rtl/index.html

etc.
etc.

Reply by email

VisionForce
to L505

Okay, I know this is a beginner questions, but how do I create a Pascal program that only reads the text and sends it through some sort of CGI thing (i.e. doesn't pop up that DOS-style window/shell). I already know how to do the CGI part, I just need to know how to make a program without a user interface.

Thanks,
Alex C. Barberi
VisionForce
http://www.visionforceweb.com

Earlier message 32 lines
----- Original Message ----- From: "L505" To: "FPC developers' list" Sent: Sunday, January 29, 2006 3:37 PM Subject: Re: [fpc-devel] Web language > > > Op Sun, 29 Jan 2006, schreef VisionForce: > >> You gave me this link: >> http://www.delphibasics.co.uk/ByFunction.asp?Main=Strings >> Are these methods supported by FreePascal, or would I need to be using >> Lazarus >> (Delphi)? > > And in addition to Daniel's comment, the documentation for these units for > FPC is > more thorough even than the Delphi documentation and a lot easier to find > on google, > which is here: > > http://www.freepascal.org/docs-html/rtl/sysutils/index-5.html > http://www.freepascal.org/docs-html/rtl/index.html > > etc. > etc. > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

L505
to VisionForce
Show quoted text 5 lines
Okay, I know this is a beginner questions, but how do I create a Pascal program that only reads the text and sends it through some sort of CGI thing (i.e. doesn't pop up that DOS-style window/shell). I already know how to do the CGI part, I just need to know how to make a program without a user interface.

The Dos window doesn't matter, it will not pop up when the server launches the program. i.e. this is also a good thing, because you can run your CGI programs as Doss windows before you deploy them, and treat them just like a regular Dos program.

You can post to the FPC users list you know, this list is more for the development of the Pascal language and the Pascal compiler.

If you want to learn about sessions/gzip/headers/cookies you can take a look at the various CGI implementations for FPC, as they are existing working examples which take care of almost all basic CGI tricks. The toughest thing to implement is GZIP probably, so don't worry about that first.

Reply by email

Christian Iversen
to VisionForce: Okay, I know this is a beginner questions, but how do I create a Pascal program that only…
VisionForce wrote 5 lines
Okay, I know this is a beginner questions, but how do I create a Pascal program that only reads the text and sends it through some sort of CGI thing (i.e. doesn't pop up that DOS-style window/shell). I already know how to do the CGI part, I just need to know how to make a program without a user interface.

On Unix platforms, you don't need to do anything. Just use read/write functions to communicate with the world around you.

On Windows, you need to define that you are not working with a GUI program, which you do like this:

{$APPTYPE console}

Other than that, there are no explicit requirements.

Regards, Christian Iversen

Reply by email

L505
to Christian Iversen
Show quoted text 13 lines
> Okay, I know this is a beginner questions, but how do I create a Pascal > program that only reads the text and sends it through some sort of CGI > thing (i.e. doesn't pop up that DOS-style window/shell). I already know how > to do the CGI part, I just need to know how to make a program without a > user interface. On Unix platforms, you don't need to do anything. Just use read/write functions to communicate with the world around you. On Windows, you need to define that you are not working with a GUI program, which you do like this: {$APPTYPE console}

I think that is with Delphi.
Isn't freepascal the opposite, where in fact command line mode is default and you must explicitly specify app type of GUI if you want a GUI?

Reply by email

Christian Iversen
to L505
L505 wrote 17 lines
> > Okay, I know this is a beginner questions, but how do I create a Pascal > > program that only reads the text and sends it through some sort of CGI > > thing (i.e. doesn't pop up that DOS-style window/shell). I already know > > how to do the CGI part, I just need to know how to make a program > > without a user interface. > > On Unix platforms, you don't need to do anything. Just use read/write > functions to communicate with the world around you. > > On Windows, you need to define that you are not working with a GUI > program, which you do like this: > > {$APPTYPE console} I think that is with Delphi. Isn't freepascal the opposite, where in fact command line mode is default and you must explicitly specify app type of GUI if you want a GUI?

Oh, I thought the original question was about Delphi - one of the recent questions were :)

Regards, Christian Iversen

Reply by email

L505
to Christian Iversen
Show quoted text 15 lines
> > On Unix platforms, you don't need to do anything. Just use read/write > > functions to communicate with the world around you. > > > > On Windows, you need to define that you are not working with a GUI > > program, which you do like this: > > > > {$APPTYPE console} > > I think that is with Delphi. > Isn't freepascal the opposite, where in fact command line mode is default > and you must explicitly specify app type of GUI if you want a GUI? Oh, I thought the original question was about Delphi - one of the recent questions were :)

Oh it might have been - I guess it depends on his decision to use fpc or delphi? :)

Reply by email

VisionForce
to L505
Show quoted text 19 lines
> > > On Unix platforms, you don't need to do anything. Just use read/write > > > functions to communicate with the world around you. > > > > > > On Windows, you need to define that you are not working with a GUI > > > program, which you do like this: > > > > > > {$APPTYPE console} > > > > I think that is with Delphi. > > Isn't freepascal the opposite, where in fact command line mode is > > default > > and you must explicitly specify app type of GUI if you want a GUI? > > Oh, I thought the original question was about Delphi - one of the recent > questions were :) > Oh it might have been - I guess it depends on his decision to use fpc or delphi? :)

Which should I use when creating a server-side web language?

Reply by email

Christian Iversen
to VisionForce
VisionForce wrote 20 lines
>> > > On Unix platforms, you don't need to do anything. Just use >> > > read/write functions to communicate with the world around you. >> > > >> > > On Windows, you need to define that you are not working with a GUI >> > > program, which you do like this: >> > > >> > > {$APPTYPE console} >> > >> > I think that is with Delphi. >> > Isn't freepascal the opposite, where in fact command line mode is >> > default >> > and you must explicitly specify app type of GUI if you want a GUI? >> >> Oh, I thought the original question was about Delphi - one of the recent >> questions were :) > > Oh it might have been - I guess it depends on his decision to use fpc or > delphi? :) Which should I use when creating a server-side web language?

I'd recommend FreePascal, no doubt about it. It would be perfect for the job. (Not that delphi would be bad, but I'd say it's biggest strength is GUI design)

Regards, Christian Iversen

Reply by email

VisionForce
to Christian Iversen
Show quoted text 32 lines
On Sunday 05 February 2006 19:25, VisionForce wrote: > >> > > On Unix platforms, you don't need to do anything. Just use > >> > > read/write functions to communicate with the world around you. > >> > > > >> > > On Windows, you need to define that you are not working with a GUI > >> > > program, which you do like this: > >> > > > >> > > {$APPTYPE console} > >> > > >> > I think that is with Delphi. > >> > Isn't freepascal the opposite, where in fact command line mode is > >> > default > >> > and you must explicitly specify app type of GUI if you want a GUI? > >> > >> Oh, I thought the original question was about Delphi - one of the > >> recent > >> questions were :) > > > > Oh it might have been - I guess it depends on his decision to use fpc > > or > > delphi? :) > > Which should I use when creating a server-side web language? I'd recommend FreePascal, no doubt about it. It would be perfect for the job. (Not that delphi would be bad, but I'd say it's biggest strength is GUI design) -- Regards, Christian Iversen

Do you know of a better Pascal IDE? The FreePascal IDE is a DOS window and it's really hard to work with.

Reply by email

Florian Klaempfl
to VisionForce
VisionForce wrote 36 lines
> On Sunday 05 February 2006 19:25, VisionForce wrote: >> >> > > On Unix platforms, you don't need to do anything. Just use >> >> > > read/write functions to communicate with the world around you. >> >> > > >> >> > > On Windows, you need to define that you are not working with a >> GUI >> >> > > program, which you do like this: >> >> > > >> >> > > {$APPTYPE console} >> >> > >> >> > I think that is with Delphi. >> >> > Isn't freepascal the opposite, where in fact command line mode is >> >> > default >> >> > and you must explicitly specify app type of GUI if you want a GUI? >> >> >> >> Oh, I thought the original question was about Delphi - one of the >> >> recent >> >> questions were :) >> > >> > Oh it might have been - I guess it depends on his decision to use >> fpc > or >> > delphi? :) >> >> Which should I use when creating a server-side web language? > > I'd recommend FreePascal, no doubt about it. It would be perfect for > the job. > (Not that delphi would be bad, but I'd say it's biggest strength is GUI > design) > > -- > Regards, > Christian Iversen Do you know of a better Pascal IDE? The FreePascal IDE is a DOS window and it's really hard to work with.

Lazarus? BTW: Most fpc development is done with the text mode ide and it's very efficient to work with it especially since it works also through ssh etc.

Reply by email

VisionForce
to Florian Klaempfl
Show quoted text 17 lines
>>> Which should I use when creating a server-side web language? >> >> I'd recommend FreePascal, no doubt about it. It would be perfect for the >> job. >> (Not that delphi would be bad, but I'd say it's biggest strength is GUI >> design) >> >> -- >> Regards, >> Christian Iversen > > Do you know of a better Pascal IDE? The FreePascal IDE is a DOS window > and it's really hard to work with. Lazarus? BTW: Most fpc development is done with the text mode ide and it's very efficient to work with it especially since it works also through ssh etc.

Hmm, okay. I didn't know I could use Lazarus for code that is only Pascal, but I guess that's just stupid to have not thought of that.

About the text mode ide; I have a lot of trouble with copying/pasting and moving through the text. I don't know, I can just move faster in Visual Studio because it's a Windows IDE.

Reply by email

Florian Klaempfl
to VisionForce
VisionForce wrote 24 lines
>>>> Which should I use when creating a server-side web language? >>> >>> I'd recommend FreePascal, no doubt about it. It would be perfect for >>> the job. >>> (Not that delphi would be bad, but I'd say it's biggest strength is GUI >>> design) >>> >>> -- >>> Regards, >>> Christian Iversen >> >> Do you know of a better Pascal IDE? The FreePascal IDE is a DOS >> window and it's really hard to work with. > > Lazarus? BTW: Most fpc development is done with the text mode ide and > it's very efficient to work with it especially since it works also > through ssh etc. Hmm, okay. I didn't know I could use Lazarus for code that is only Pascal, but I guess that's just stupid to have not thought of that. About the text mode ide; I have a lot of trouble with copying/pasting and moving through the text. I don't know, I can just move faster in Visual Studio because it's a Windows IDE.

Well, I use VS at work, but I know which IDE is more efficient, e.g. instant start of compiler etc. :)

Reply by email