I'm Delphi developer, and I would like to build few web applications, I know about Intraweb, but I think it's not a real tool for web development, maybe for just intranet applications
so I'm considering PHP, Python or ruby, I prefer python because it's better syntax than other( I feel it closer to Delphi), also I want to deploy the application to shared hosting, specially Linux.
so as Delphi developer, what do you choose to develop web application?
Try Morfik http://www.morfik.com/
P.S.
It looked promising a few years ago, but after I digged it deeper I must admit that it's quite limited web development environment for a very basic web development.
Why should an answer be different if the question was asked by a Delphi programmer, than a programmer from any other platform? Any decent language should be fun to learn, regardless of the tool you are using right now.
That said, I myself walked a way from Borland Pascal and Delphi (quite some time ago), over PHP and ASP.NET (using C#). Right now I am working almost exclusively on Ruby (and occasionally Rails) and I am perfectly happy with it. But, then again, it's matter of personal preference: I really enjoy Ruby's pure object-orientation and functional capabilities, as well as dynamical nature of a scripting language. So, it's all up to you and your personal preferences.
Although, one thing I can surely recommend is to stick with one of the major web-players, for pragmatic reasons: PHP, Python, Ruby, ASP.NET or possibly Java. I'm sorry to say that, but I don't think Pascaloid languages have any future anymore.
If you feel like stretching your muscles, you could try out Seaside.
Seaside's a Smalltalk framework (so working with it will feel pretty much like working with Ruby) that lets you write your website just like you'd build a desktop application. You can split your code up into components that you can assemble much like you'd work with TComponents (programmatically, at least).
I agree about Intraweb, but Delphi itself is still a good language to build websites with. You could start a CGI application or an ISAPI-extesion. You could also check out http://xxm.sf.net , it's an open-source project I started that offers a few extra's:
You can mix HTML and Delphi code into the same files (much like PHP)
These files get auto-compiled to a Delphi project so you can see the results by refreshing the web-browser (much like PHP)
You can load the library with a number of 'handlers':
there's a IInternetProtocol implementation to use with InternetExplorer directly (really handy for development
there's an ISAPI extension that loads the library (and auto-updates is, really handy for updates on live-environments)
there's a stand-alone HTTP executable or NT-Service
there's even a FireFox plugin and Apache module in the making.
PHP is the best to start, but as experienced programmer you may want to look at Python, because PHP is a C style language. Python would be easier after Pascal, I think.
Take a look at examples:
On PHP: http://en.wikipedia.org/wiki/Php#Syntax
On Python: http://en.wikipedia.org/wiki/Python_(programming_language)#Syntax_and_semantics
Note, that Ruby and Python are rarely used by them selves in web-development. Usually Django and Ruby on railes frameworks are used. In PHP there are several variants. You can code from the scratch, or also use some framework.
I used to code on PHP for about five years and now started to learn Django (python based framework) and I think it's the best thing there is. Take a look: http://djangoproject.com/
Only good answer - C# ;) Seriously ;)
Why? Anders Hejlsberg. He made it. It is the direct continuation of his work that started with Turbo Pascal and went over to Delphi... then Microsoft hired him and he moved from Pascal to C (core langauge) and made C#.
Read it up on http://en.wikipedia.org/wiki/Anders_Hejlsberg
If you come from Delphi, you will love it ;)
PHP is a pretty simple answer.
One reason is there is both Delphi4PHP (the rather cryptic IDE licensed by Embarcadero which in my estimation is really only for Web Apps (not for doing whole site)s) and PHP4Delphi (the pretty awesome Delphi Component that lets you compile your Delphi code to PHP Extensions).
I'm a long-time Delphi developer myself and had to do some web work recently, I decided to use ASP.Net with Delphi Prism and found myself right at home since I didn't have to learn a new language, just a new framework.
Actually, the answer probably is ASP.NET using C#. You'll see (ex-)Borland engineering syntax that looks quite familiar coming from Delphi. To deploy on Linux have a look at the Mono project.
I have done a fairly large (4-5 FTE) project based on webhub (www.href.com). I can certainly advise this if it is a webapp for internal use.
Related
I have such a conception, to build a simple web application using some php/mysql hosting service. I'd also like to create a local version of that app. The local version should work similarly as the online one (i.d. using browser as the ui) and have the ability to communicate with the server. I want it to be as lightweight as possible.
Professionally, I'm a c#/.net programmer. I also have some experience with c/c++,javascript, python and java. I know very little about php, and honestly, I don't like the feeling coding in that language, hence, don't have much willingness to dig into it. .Net, python or java they're all too unwieldy, I can't force the users to install any of them. So I thought about haxe's multi-targeting. If I were to code the project in haxe (it seems pretty straight forward to learn, for some one with my background), I might use the same logic on both side of the server and the client, by targeting both php and neko.
As a novice, I have some doubts. I'm not sure if haxe for php alreadly mature enough for this kinda job. I know haxe is a cousin of ActionScript, it primarily targets AS, and because the author is also the inventor of nekoVM, therefore, these two targets should be fine. But uh, how about php? Is it really good for that as well? Any hints or suggestions? Is haxe's builtin libraries ok for a simple web app or should I use a framework? Does neko have a httpRequest functionality at all?
Much gratitude in advance.
The straight answer is that Haxe/PHP seems to really fit well for you. That because of you background. I used Haxe/PHP in several projects (it happens that I am also its author) and speed has never been an issue for me. If there are bottlenecks usually there are also ways to optimize those portions for better performances, and if in the end you application scales to billions of users you can always opt to switch to neko or a C++/cgi combo.
About the frameworks there are a few options too: Web "frameworks" for Haxe to deploy in a PHP environment?
I'm looking to develop a Win32 desktop app - a one off, for a personal need. A GUI is not scrictly needed, though would be a bonus.
What is needed:
The ability to monitor the window title of a specific window.
The ability to run DOS commands when this window title changes.
I hope my programming ability is up to this - I feel I'm pretty good with PHP, but I'm not ready to spend time learning OO for this one-off project.
What non OO (or at least not mandatorily OO) languages are there for desktop apps that might be suitable for a beginner on a task like?
Any other, more hacky approaches are welcome too - batch scripts etc.
Many thanks for any advice,
Jack
Whether or not the language supports OO doesn't really matter for your purposes. After all, PHP supports objects and you seem to do just fine with it.
Personally, i'd recommend Java or C# to get started with. The communities for these two languages are huge and there are plenty of tutorials online to help you get started.
It's extremely easy to get starting writing C# with Visual Studio Express. And a good hello world tutorial.
Also, if you stick with C# you can take advantage of WMI which will allow you to do everything you need for this project (and much much more).
Lastly, most windows machines will be able to run your application without having to install anything extra and Visual Studio builds the .exe for you as part of the build process.
You can use PHP for desktop apps if you really want to. Just install the php CLI.
You can even do a gui for your desktop app in php: http://gtk.php.net/
EDIT: I'm not sure how easily you can call win32 api functions from PHP, however. There look to be a few articles about this online and a SO question: How to call winapi functions from PHP?
I would vote for Python using the included TkInter module for GUI. Dead simple to use.
Widgets aren't the prettiest looking, but development is rapid.
EDIT: I mistook "non-OO" in the question for "OO". Python is most definitely not "non-OO", but but is very well suited to doing what you asked.
You could write this in pretty much any mainstream language supported by Windows. C or C++ are obvious choices. C# and Visual Basic .NET are going to require the .NET Framework ... not a bad thing, but perhaps more than you want to tackle for a simple project. Come to think of it, you might be able to do this with JScript or VBScript, although I'm not clear on what API functions you have easy access to. And I have to believe that it's possible to do with PowerShell with just a little work.
Your options are wide open.
F#
It's an awesome piece of work, has access to the Framework class libraries, supports GUI development, really easy parallel programming, compiles to IL (same as C#) but has a really concise functional syntax.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
.NET & ASP vs PHP
Are there speed differences, performance issues, and what reasons do businesses have when they choose one or the other, is the learning curve steeper for one over the other?
Also... are you likely to be paid more using one over the other?
Microsoft has published a great overview of migrating from PHP to ASP.NET which reveals differences and similarities.
http://msdn.microsoft.com/en-us/library/aa479002.aspx
ASP and PHP are similar in that both tend to put their code in with the HTML, and so the logic can be quite similar.
But, ASP.NET will be very different from PHP in design, as there is a strong incentive to use code-behind in ASP.NET, where you basically have the html template and all the code is in another separate file
Depending on what you are doing, how busy your site is, you may find that the speed difference is inconsequential, though one is compiled and the other isn't.
PHP is probably going to be faster to develop, as you can more easily code a little and test, than you can with ASP.NET, but ASP and PHP are similar in how you can develop.
If you don't know any of these languages then PHP may be the easier one to learn, as the php manual is so well written, with lots of comments from users, and ASP.NET has replaced ASP, so learning ASP for a new project, IMO, is of limited use.
If you go with ASP.NET then you are learning a new syntax and one of the .NET languages, but depending on your background, C# may be relatively easy to learn.
With ASP or ASP.NET you are stuck with using IIS for your server, but with PHP you can use IIS or Apache, so there is considerable flexibility there.
With ASP.NET you will find more options to help with code development, as they now have the classic ASP.NET and ASP.NET MVC (http://www.asp.net/%28S%28d35rmemuuono1wvm1gsp2n45%29%29/mvc/), both with pros and cons, but I believe this site is still written in the latter.
So, which would be better depends on what you are going to be doing with it, and what languages or frameworks you have already gained experience with.
The Microsoft route will have a better learning curve if you are coming from a VB6 or other Microsoft platform. You'll probably have more hardware & licensing requirements to run the Windows Server/IIS/SQL Server/.NET platforms than LAMP. Whether or not you can manage one better than the other is a matter of skill set & probably opinion.
An really important feature of .NET is that it can be used for developing web apps (ASP .NET), desktop apps, web services, Palmtop development, in short pretty much anything (the only problem being it is not cross-platform, unless you count the open source Mono project, which is coming along well). So ASP .NET is only one part of its capability. If you were writing a suite of applications for desktop, web, palm then the same business logic libraries could be re-used for all of these projects.
PHP is pretty much web-only and is specialised in that area.
If you are only interested in creating a web app, then PHP competes well and the learning curve would be much smaller.
.NET is in essence Java rebadged and developed further, with the cross platform capabilities removed.
The most fundamental difference between the two is the language. PHP uses a C-like syntax, while ASP uses Visual Basic as its syntax.
ASP.NET, however, is an entirely different beast; I note you've listed ASP in your title, but ASP.NET in your tags.
ASP.NET is a templating language that can work in front of any .NET programming language, the most common being C# and VB.NET. ASP.NET uses (and comes with) the .NET framework, and is far more object-oriented than either PHP or ASP.
In general, PHP and ASP will seem faster for many tasks, but ASP.NET will provide a better chance at building a robust, maintainable application.
Personally I like the flexibility you get when using PHP. However, ASP.net is quite fast to write a quick application in. It is used by a lot of large companies for web dev as well. Page layout can be done using point and click in Visual Studio though you can directly access the HTML markup and use templates, css etc.
With no adjustments to the languages (besides turning on page caching in asp.net) the benchmarks I have seen point to ASP.net being slightly to moderately faster.
The reason for this is that ASP.net is compiled whereas PHP is an interpreted language.
What all is involved if I wanted to switch from PHP to asp.net? I have basicly no knowledge of asp or other languages besides php and some javascript.
What would be the best place to start learning more?
What is needed to host an asp site?
What is it developed with?
Is there an equivalent to php.net for a resource?
I think a good place to start would be to take one of your existing PHP projects, and rewrite it in ASP.Net. That way you wouldn't really be tasked with coming up with something new, and learning a language at the same time. However, don't just try to do a line by line conversion. ASP.Net has a much different programming model than PHP. So you'd be much better off looking at the end product, and trying to produce the same thing, without necessarily producing the same code.
google asp.net c# tutorial. seriously
download ms VS express edition(free) http://www.microsoft.com/express/vwd/
do a project. nothing like learning on the job
I did this switch several times. If you have good grasp of OO and the most common design patterns, you won't have too much of a problem to grasp the dot.net languages.
b.t.w I really REALLY suggest you consider only C#.
Best way to start is take a Wrox book and start learning it. Do not start directly from asp.net, but rather from console applications.
The book will show you how to install a development environment, which is an inseparable thing from the dot.ent env.
If what the book suggests is not the MS express environment, I suggest you use Express.
As far as something like php.net, well, MSDN is by far a better tool then php.net and this is from a PHP freak and ex-Zender.
To sum it up, just do the exercises in the book, it will be OK
I've written PHP web projects for several years and considered myself intermediate with PHP. I recently wrote an application (in PHP) for a company that got noticed by the programming department, and they had me transition to a job programming in C# and .NET.
My first reaction was very standoffish; I learned to program in an anti-Microsoft environment and mindset. The last thing I wanted to do was learn something in .NET.
After several months of forcing myself to learn C# and OOP I have to say it's actually a wonderful thing. At least for developing Windows applications. I'd always wanted to do some desktop applications and this has been a great way to do it.
But so far nothing has involved ASP.net, and now I have a project which requires some web output. I'm struggling with learning ASP, and the fact of the matter is I am tempted to write the web portion of it in PHP. For me, C# makes sense for Windows and OOP, but for quick data-parsing applications on the web, PHP is quick and gets the job done.
I am going to keep working on the ASP thing though, specifically looking at MVC. Another question on SO got me interested in focusing on MVC. I've been perusing books and watching tutorial videos, and so far I am hopelessly confused.
Perhaps it will be something I look back on and am grateful for having made the effort -- like learning C# in the first place. Right now, the ASP approach to web coding seems foreign, despite knowing more about C# and OOP than I did a year ago.
I made the switch from script-based server side languages (Classic ASP and PHP) to .NET a number of years back. If I recall, the hardest part was understanding the tight integration between client-side events and server-side event handling. Once that clicked the rest was just an exercise in learning new syntax (that was actually more like C++ which I learned in college).
I've been doing html, css and javascript for quite a long time, mostly for my very own enjoyment. I would say I know fairly much, I've created many simple games and apps and experiments with javascript. However there is only so much that is possible to do in the browser, for any more "complete" websites I am constantly confronted with my ignorance on server side programming.
So, what do I need. I need to get my head around how to use databases and how to use some server side programming language, I guess. What is the right choice? What should I avoid?
Thanks.
PHP and MySQL have a pretty low barrier to entry (they're both free and ubiquitous). I'd start with those, since most hosts provide them for you. As an added bonus, they work really well together (and PHP isn't very hard to learn coming from a web development background).
Head First SQL is a great book for learning MySQL. All of the examples in the book are done on MySQL. The book even explains where to get it and how to install it. As for PHP, the introductory tutorial at official website is the best place to learn it.
Update: Head First PHP & MySQL is now available. I haven't read this one yet, but other books in the series and by the same author are great for learning new languages from scratch.
Download Python. Learn the Python language. Learn Object-Oriented programming.
Python includes SQLite, this makes it easier to Learn the SQL language.
Download the Django framework. This makes it easy to write server-side applications that work simply and reliably.
I would suggest PHP. Not because it's the best, most modern or cleanest language out there, but because it is easy to learn for someone coming from pure HTML.
You begin by just adding tiny bits of PHP to your regular HTML and magic happens :)
Ruby is a fantastic language and the frameworks for web stuff generally teach you some good practices. Try it. The Learn to program book uses Ruby, maybe you'd like to check it out.
I noticed in your question you mention that you've been using javascript. If you're comfortable progamming javascript, I've recently begun working with server side javascript in the form of EJScript on linux and using jscript on windows. It's been fairly painless, and the documentation has been pretty good so far on both.
If you're more interested in learning this with another technology then Django & Python or ASP.NET & C# (or IronPython) are both fairly low barrier to entry platforms available on windows, *nix, etc...
I would say that if you're comfortable working in Linux, then go for PHP and MySQL. If you aren't comfortable working in Linux, then download the free Visual Web Developer version of Visual Studio Express, and get started using that. This lets you program in VB.Net or C#, and use the .Net web development framework. It's really miles ahead of anything PHP in terms of how nice a platform it is to work on. There's also a free developer edition of SQL Server that lets you store up to 4 GB of data.
There's plenty of .Net hosts out there now too. Although, due to increased license costs, Windows hosting plans will usually cost more and give you less space/bandwidth than Linux hosting plans, you can still get enough room to play around with and deploy some apps on the web. If you develop something really cool, and outgrow what your hosting account provides, it's probably time to upgrade to a VPS, and post ads on your site to start paying the bills
I'd recommend PHP for folks who are familiar with HTML but are newish to programming. Here's why:
I'm currently an ASP.Net developer, and I think that ASP.Net abstracts waaaaay to much to make it a good first programming environment. I say learn how to generate and manipulate straight HTML with a language like PHP instead of trying to understand GridViews, etc., which have no bearing or relevance to programming in the broader sense.
I wouldn't say ASP.Net is "the Dark Path" or anything, but if you start out by learning it, you'll tend to favor the warm and insulating arms of the framework. ASP.Net is pretty much a code-generator when compared to more explicit (some would say reckless, messy, and tedious, but I'm not one of them) methods like PHP.
With PHP you'll see the effect your code has on the actual HTML when you view source. With an ASP.Net page, you'll be baffled by the amount and complexity of the HTML it spits out.
After you get your hands dirty in PHP, you can explore the pros and cons of frameworks like ASP.Net that "do a lot of the work for you".
I was exactly in your situation 3 to 4 years ago and, like some of the commentators suggest, I tried PHP because of its low barrier of entry.
That was a mistake! Oh sure I was able to achieve some things here and there, including using a contact form from a book which was so flawed that it was later hijacked by big time spammers and got my domain banned from most email servers out there.
Later on I tried to learn how to create dotabase driven sites with object oriented programming following the guidance of the excellent books, blog posts, and forums from Sitepoint and other sources. It was just too hard for my little brain. I just could not do it.
So what happened? 2 1/2 years ago I decided to learn Rails, which had just turned v. 1.1. It has been fun since the beginning and extremely rewarding. Working with Ruby is a pleasure, much easier to learn than PHP, and the Rails framework is so well put together that you can, with little effort, produce some very elaborate web sites with advanced features all while learning how to do proper object oriented web programming.
I used my new knowledge to recreate from scratch the site of my non-profit organization (with a new domain ;-) and, with a friend who is a talented designer, created a web development firm.
Don't get me wrong, it's not that easy, if you want to learn programming you need to put a lot of effort into it but in my own experience Rails can bring you some instant results while letting you get deeper and deeper over time.
I recommend two main sources of knowledge:
The excellent, official Rails
guides.
The free screencasts
from Railscasts.
Whatever your choice will be I wish you the best and a fun and fulfilling experience
I recently came upon this question myself. I really liked the way PHP integrates with HTML making designing a site more natural in my opinion. Design your site as you would with static content and then switch the static with the dynamic. However, I wanted to choose a "good" language. I looked at PHP, Ruby, Perl, and Python, as they are the most popular, open source options. I didn't need any powerhorses, if you will, like Ruby on Rails or Django, since I just wanted to mess around with server side stuff and some SQL—nothing serious. I don't remember why nor do I care to remember why, but I chose Python. But I still wanted that integration with HTML. I came across Karrigell. It's a neat piece of Python that essentially handles the integration. It comes with a little web server which you can use on its own or use something like mod_proxy with lighttpd. The devs don't limit you to only Python inside HTML, though. Their server parses: Python inside HTML, HTML inside Python, plain ol' Python scripts, and Karrigell services. It may not integrate as well as PHP does, but it's pretty damn good.