,NET to PHP
-
Well, for as far as I know PHP does not have controls sets through any IDE. I have never been a fan of the drag and drop approach within programming languages and when i'm building ASP.NET websites you would see me coding it anyway. With that said, there are libraries which offer specific sets of tools for PHP. jQuery is an example of this library, and yes I do know that this is javascript but it's perfectly integratable with PHP. Personally I've programmed PHP for 7 years with notepad and an FTP application. Last year I started using NotePad++ which does Syntax coloring for me which is always great. If you want to take a step further in rapid PHP development I'd advise you to take a good look as Vs.PHP http://www.jcxsoftware.com/vs.php[^]. This is a plugin for your Visual Studio environment of choice and provides syntax coloring, instellisense and debugging for your PHP websites. If you have any other question, ask away :)
Thanks for the info! I use Visual Studio all day and I love it, but I'm a huge fan of the hammer + nails approach, and Notepad++ is one of my favorite tools. Also, for dynamically typed languages like PHP and Ruby, I find the intellisense can't be too great anyway. More and more I'm of the mindset that fancy tools often remove flexibility and power from what I'm trying to do. As far as the libraries you mentioned, do they have the concept of databound controls? In other words, in classic ASP I'd have to write a for loop and for each record in the db i'd generate table markup by hand. In ASP.NET I can just pass a dataset or datatable object to a gridview control and it lays it out for me, generating all the markup. Again, it can be very inflexible when you want to get fancy, but for plain vanilla data presentation it is a MAJOR time-saver, especially now that it has built in sorting and paging. Does PHP have controls like these out there in the public domain, or does everyone roll their own?
-
I know it sounds terrible. But i have ended up in a situation where the client only use PHP and MYSQL. And that means i have to learn PHP and MYSQL which am not that excited about. I am just wondering - what is the best way i can convince them to use .NET technology instead of PHP and sql server instead of mysql. But then they can say Facebook uses PHP and it's good. So what do you all suggest .NET or PHP ? Which one is better ?
Perhaps you are asking the wrong question. If the customer has a PHP/MySQL base and you are not comfortable working with these, then perhaps you should recommend another developer for the task instead of trying to change the customer. On the other hand if you can work in NET/SQL, you should not have much problem working in PHP/MySQL. Most languages have similar structure; the most significant differences are syntax.
Melting Away www.deals-house.com www.innovative--concepts.com
-
With experience it becomes a mental step that does not require work on paper. However, when confronted with something new and scary it breaks it down into something a lot more management. Irregardless, to use an imaginary word, it is a legitimate deliverable step.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane
Irregardless is not a word :-) The correct word is simply "regardless"
-
Irregardless is not a word :-) The correct word is simply "regardless"
Reread my post. "Irregardless, to use an imaginary word, it is a legitimate deliverable step."
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane
-
I know it sounds terrible. But i have ended up in a situation where the client only use PHP and MYSQL. And that means i have to learn PHP and MYSQL which am not that excited about. I am just wondering - what is the best way i can convince them to use .NET technology instead of PHP and sql server instead of mysql. But then they can say Facebook uses PHP and it's good. So what do you all suggest .NET or PHP ? Which one is better ?
I'm sorry but it sounds like you're looking for a way to justify choosing .NET over PHP. I will answer your question rather as "Why .NET vs PHP?" .NET relies on a centrally controlled library. Your code is basically pseudo code which gets interpreted and delivered to the client browser. What this means is .NET has the advantage of cross-browser support out of the box without any special programming. Trying to do so in PHP is more of a manual process or piecemeal. Another advantage to the central library aka .NET is one patch enables (or on a rare note, disables) more features, possibly more browser support without any change to the web page code. Security issues such as SQL injection is handled by .NET as well as others. The chances of forgetting to call a "Cleaning" function in PHP presents a problem for the loose PHP programmer. Also, I had been avoiding .NET as it is a buzzword, and I know this one in particular colleague of mine who talks .NET to a point where it sounds complex, confusing, and impressive. Recently, however, I have delved into .NET and I have to laugh at the ease at which everything is done. The next time I spoke with my colleague and she started rambling about .NET, I told her I took a look at it and created some proof-of-concept pages to help me understand it. She was like, "WOW, you did that?" I told her my overview of .NET as it is more a "point, click, and done" system than a language or developer environment. I told her, ".NET, Silverlight, all the same thing. It's really impressive in its centrally managed core, but it's not for me. I like getting my hands dirty." So that is my take on the situation. .NET/Silverlight is great, but it's not for me. If you want to impress your clients, tell them you'll be developing in .NET AND Silverlight and they will be impressed. Silverlight is kind of a buzzword now and I told my co-workers I have done some of our web pages in Silverlight and they pretty much did a jaw drop. You can imagine how a non-developer would react... I hope you find this useful. Gary
-
AndyInUK wrote:
Which one is better ?
Impossible question to answer. There are too many variables to consider and each is equally good when used properly for the right purposes.
I know the language. I've read a book. - _Madmatt
First of all, "Impossible" is a poor choice of words. Second of all, well, actually... That's all. Anyway, it depends on context and perspective. In the relatively short message which sparked this discussion, AndyInUK obviously is leaning toward .NET. It may disgust me that a language and development platform exists where you can literally not use the keyboard AT ALL to create data driven web sites. Follow me here - Start->Programs->Microsoft Visual Studio 2010->Microsoft Visual Studio 2010 File->New->Project Silverlight->Silverlight Business Application OK Next->next->next til the thing stops doing stuff. Under Solution Explorer on the right, there is BusinessApplication1 and BusinessApplication1.Web. Under BusinessApplication1.Web, right-click on Models, then Add->New Item. Data->ADO.NET Entity (blah blah) Next->next->next, click the database and table (windows authentication is default), then next->next til the thing stops doing stuff. Build->Build Solution Under BusinessApplication1.Web, right-click Services, Add->New Item Web->Domain Service Class Next->next->next (click the table you picked in the ADO.NET Entity step above), then next->next til the thing stops doing stuff. Open the Toolbox, click and drag DataGrid to the MainPage.xaml page (you may have to close the other data model windows etc, or just click on the tab which says MainPage.xaml first). On the right, under Properies, expand Columns, then put a checkmark in "AutoGener..." (depending on your screen size, it may say "AutoGenerateColumns") Debug->Start Without Debugging There you have it. So if your computer doesn't have a keyboard or you don't want to use it, you can develop entire silverlight sites, although all your sites and pages will be named BusinessApplication1, BusinessApplication2, and so forth. Minor setback. If the client says, "I just want a website", then you're done. Again, .NET/Silverlight (one and the same to me,) does not appeal to me (as shown in my post further down), but it is a powerful tool and I wouldn't bash someone for choosing it. My choice of PHP over .NET is just personal. One of my personal pet-peeves. "To each, their own" - Someone famous... Gary
-
First of all, "Impossible" is a poor choice of words. Second of all, well, actually... That's all. Anyway, it depends on context and perspective. In the relatively short message which sparked this discussion, AndyInUK obviously is leaning toward .NET. It may disgust me that a language and development platform exists where you can literally not use the keyboard AT ALL to create data driven web sites. Follow me here - Start->Programs->Microsoft Visual Studio 2010->Microsoft Visual Studio 2010 File->New->Project Silverlight->Silverlight Business Application OK Next->next->next til the thing stops doing stuff. Under Solution Explorer on the right, there is BusinessApplication1 and BusinessApplication1.Web. Under BusinessApplication1.Web, right-click on Models, then Add->New Item. Data->ADO.NET Entity (blah blah) Next->next->next, click the database and table (windows authentication is default), then next->next til the thing stops doing stuff. Build->Build Solution Under BusinessApplication1.Web, right-click Services, Add->New Item Web->Domain Service Class Next->next->next (click the table you picked in the ADO.NET Entity step above), then next->next til the thing stops doing stuff. Open the Toolbox, click and drag DataGrid to the MainPage.xaml page (you may have to close the other data model windows etc, or just click on the tab which says MainPage.xaml first). On the right, under Properies, expand Columns, then put a checkmark in "AutoGener..." (depending on your screen size, it may say "AutoGenerateColumns") Debug->Start Without Debugging There you have it. So if your computer doesn't have a keyboard or you don't want to use it, you can develop entire silverlight sites, although all your sites and pages will be named BusinessApplication1, BusinessApplication2, and so forth. Minor setback. If the client says, "I just want a website", then you're done. Again, .NET/Silverlight (one and the same to me,) does not appeal to me (as shown in my post further down), but it is a powerful tool and I wouldn't bash someone for choosing it. My choice of PHP over .NET is just personal. One of my personal pet-peeves. "To each, their own" - Someone famous... Gary
Perhaps you should put this in an article, "How to build an ASP.NET web application without a keyboard" A very short sighted rant from a close-minded language snob, but thanks for sharing.
I know the language. I've read a book. - _Madmatt
-
I'm sorry but it sounds like you're looking for a way to justify choosing .NET over PHP. I will answer your question rather as "Why .NET vs PHP?" .NET relies on a centrally controlled library. Your code is basically pseudo code which gets interpreted and delivered to the client browser. What this means is .NET has the advantage of cross-browser support out of the box without any special programming. Trying to do so in PHP is more of a manual process or piecemeal. Another advantage to the central library aka .NET is one patch enables (or on a rare note, disables) more features, possibly more browser support without any change to the web page code. Security issues such as SQL injection is handled by .NET as well as others. The chances of forgetting to call a "Cleaning" function in PHP presents a problem for the loose PHP programmer. Also, I had been avoiding .NET as it is a buzzword, and I know this one in particular colleague of mine who talks .NET to a point where it sounds complex, confusing, and impressive. Recently, however, I have delved into .NET and I have to laugh at the ease at which everything is done. The next time I spoke with my colleague and she started rambling about .NET, I told her I took a look at it and created some proof-of-concept pages to help me understand it. She was like, "WOW, you did that?" I told her my overview of .NET as it is more a "point, click, and done" system than a language or developer environment. I told her, ".NET, Silverlight, all the same thing. It's really impressive in its centrally managed core, but it's not for me. I like getting my hands dirty." So that is my take on the situation. .NET/Silverlight is great, but it's not for me. If you want to impress your clients, tell them you'll be developing in .NET AND Silverlight and they will be impressed. Silverlight is kind of a buzzword now and I told my co-workers I have done some of our web pages in Silverlight and they pretty much did a jaw drop. You can imagine how a non-developer would react... I hope you find this useful. Gary
Sounds like you are enjoying your little pond, try a swim in the ocean. Hope the pond doesn't dry up before then, it's the big fish that don't survive.
I know the language. I've read a book. - _Madmatt
-
Perhaps you are asking the wrong question. If the customer has a PHP/MySQL base and you are not comfortable working with these, then perhaps you should recommend another developer for the task instead of trying to change the customer. On the other hand if you can work in NET/SQL, you should not have much problem working in PHP/MySQL. Most languages have similar structure; the most significant differences are syntax.
Melting Away www.deals-house.com www.innovative--concepts.com
Okay, now. I was ALMOST able to stomach your comment about .NET/SQL being similar, especially to a point where MarkInUK should not have much problem moving to PHP/MySQL. REALLY now... I mean REALLY. Saying they are similar is like saying "Dog" is similar to "Blue". Come on now...
-
Sounds like you are enjoying your little pond, try a swim in the ocean. Hope the pond doesn't dry up before then, it's the big fish that don't survive.
I know the language. I've read a book. - _Madmatt
-
Perhaps you should put this in an article, "How to build an ASP.NET web application without a keyboard" A very short sighted rant from a close-minded language snob, but thanks for sharing.
I know the language. I've read a book. - _Madmatt
-
Thanks for the info! I use Visual Studio all day and I love it, but I'm a huge fan of the hammer + nails approach, and Notepad++ is one of my favorite tools. Also, for dynamically typed languages like PHP and Ruby, I find the intellisense can't be too great anyway. More and more I'm of the mindset that fancy tools often remove flexibility and power from what I'm trying to do. As far as the libraries you mentioned, do they have the concept of databound controls? In other words, in classic ASP I'd have to write a for loop and for each record in the db i'd generate table markup by hand. In ASP.NET I can just pass a dataset or datatable object to a gridview control and it lays it out for me, generating all the markup. Again, it can be very inflexible when you want to get fancy, but for plain vanilla data presentation it is a MAJOR time-saver, especially now that it has built in sorting and paging. Does PHP have controls like these out there in the public domain, or does everyone roll their own?
For as far as I know there is no such thing as databound controls of any kind. I'd say it's just writing a loop to generate each table record by hand. To be honest with you, i'm a big fan of this approach. DataBound controls in ASP.NET make me feel like I don't have direct control over my output anymore. For example: I couldn't find out how to disable a button for specific rows in the databound control. In the manual hand written loop it's as easy as a simple if check.
-
I know it sounds terrible. But i have ended up in a situation where the client only use PHP and MYSQL. And that means i have to learn PHP and MYSQL which am not that excited about. I am just wondering - what is the best way i can convince them to use .NET technology instead of PHP and sql server instead of mysql. But then they can say Facebook uses PHP and it's good. So what do you all suggest .NET or PHP ? Which one is better ?
I would fight to use .NET but I have no exp with PHP. On the mySQL vs SQL Server thing mySQL is really nice but again no exp in SQL Server so maybe I just don't know any better. Humble Programmer
-
For as far as I know there is no such thing as databound controls of any kind. I'd say it's just writing a loop to generate each table record by hand. To be honest with you, i'm a big fan of this approach. DataBound controls in ASP.NET make me feel like I don't have direct control over my output anymore. For example: I couldn't find out how to disable a button for specific rows in the databound control. In the manual hand written loop it's as easy as a simple if check.
A few years ago I would have disagreed with you and touted how fast I could throw together a master detail page, with sorting, and caching and the whole bit. But nowadays, I am almost constantly running into things which are either impossible with these fancy tools, or take a level of research and trial and error that A)undo the work the tool had saved you and frequently B)add a layer of complexity and general 'not-obviousness' to your solution which will trip up another dev(or you) in the future. And every time this happens I find myself wishing we'd gone the hammer & nails route. I'm definitely one that hates reinventing the wheel, and I'm always making tools to speed up dev tasks. But lately I'm getting very sensitive to any tool or approach that removes flexibility. As a for instance, did you know that the ASP.NET Gridview, one of the most ubiquitous controls out there, WILL NOT let you insert a column at runtime, nor will it let you remove a column from the middle, or rearrange the columns at runtime, unless you turn off the ViewState, and lose all your fancy sorting/filtering/caching. That seems like a pretty common request of a control that just manages columns and rows. And Microsoft acknowledged this bug 5 years ago and said they were unable to fix it in 2005, still unable in 2008, and now we have visual studio 2010, and the bug is still so deep down in their codebase that they can't risk a change like that. Sounds crazy if you ask me. No wonder people pay for Infragistcs and Telerik controls. But then those have their own set of issues.
-
Reread my post. "Irregardless, to use an imaginary word, it is a legitimate deliverable step."
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane
Haha, I though 'deliverable step' was the imaginary word. And yes, one of my primary school teachers insisted on called multi-word phrases 'words', but then half my primary school English teachers were native Afrikaners and less than perfect at English. :rolleyes:
-
With experience it becomes a mental step that does not require work on paper. However, when confronted with something new and scary it breaks it down into something a lot more management. Irregardless, to use an imaginary word, it is a legitimate deliverable step.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane
Yes, but if you need a tag soup intermediate step, as an ASP.NET developer, MVC is in my slightly less than humble opinion a much, much better route. That way you have a manageable and modern product at the end of your intermediate step, in case you die on the way to PHP.
-
Well, for as far as I know PHP does not have controls sets through any IDE. I have never been a fan of the drag and drop approach within programming languages and when i'm building ASP.NET websites you would see me coding it anyway. With that said, there are libraries which offer specific sets of tools for PHP. jQuery is an example of this library, and yes I do know that this is javascript but it's perfectly integratable with PHP. Personally I've programmed PHP for 7 years with notepad and an FTP application. Last year I started using NotePad++ which does Syntax coloring for me which is always great. If you want to take a step further in rapid PHP development I'd advise you to take a good look as Vs.PHP http://www.jcxsoftware.com/vs.php[^]. This is a plugin for your Visual Studio environment of choice and provides syntax coloring, instellisense and debugging for your PHP websites. If you have any other question, ask away :)
Jordy "Kaiwa" Ruiter wrote:
With that said, there are libraries which offer specific sets of tools for PHP. jQuery is an example of this library, and yes I do know that this is javascript but it's perfectly integratable with PHP.
Microsoft have been pushing jQuery for ASP.NET for a few years now, and with ASP.NET 4, the rendering is much better suited to jQuery. I suspect the move away from complex table based rendering was in part motivated by jQuery requirements. If you want truly scary rendering, look at older Telerik, but they are also pushing accessible client side code these days.
-
For as far as I know there is no such thing as databound controls of any kind. I'd say it's just writing a loop to generate each table record by hand. To be honest with you, i'm a big fan of this approach. DataBound controls in ASP.NET make me feel like I don't have direct control over my output anymore. For example: I couldn't find out how to disable a button for specific rows in the databound control. In the manual hand written loop it's as easy as a simple if check.
Jordy "Kaiwa" Ruiter wrote:
For as far as I know there is no such thing as databound controls of any kind.
What about a view engine[^]? [Jaco has actually since that blog released his own open source view engine, but its name escapes me this morning. I'm sure he would be delighted to have someone examine his code and port it to PHP, if there isn't something similar.]
-
A few years ago I would have disagreed with you and touted how fast I could throw together a master detail page, with sorting, and caching and the whole bit. But nowadays, I am almost constantly running into things which are either impossible with these fancy tools, or take a level of research and trial and error that A)undo the work the tool had saved you and frequently B)add a layer of complexity and general 'not-obviousness' to your solution which will trip up another dev(or you) in the future. And every time this happens I find myself wishing we'd gone the hammer & nails route. I'm definitely one that hates reinventing the wheel, and I'm always making tools to speed up dev tasks. But lately I'm getting very sensitive to any tool or approach that removes flexibility. As a for instance, did you know that the ASP.NET Gridview, one of the most ubiquitous controls out there, WILL NOT let you insert a column at runtime, nor will it let you remove a column from the middle, or rearrange the columns at runtime, unless you turn off the ViewState, and lose all your fancy sorting/filtering/caching. That seems like a pretty common request of a control that just manages columns and rows. And Microsoft acknowledged this bug 5 years ago and said they were unable to fix it in 2005, still unable in 2008, and now we have visual studio 2010, and the bug is still so deep down in their codebase that they can't risk a change like that. Sounds crazy if you ask me. No wonder people pay for Infragistcs and Telerik controls. But then those have their own set of issues.
I'm truly suprised I can't add a column, but I often hide columns at run-time, and if hide them server side they don't render.
-
I'm truly suprised I can't add a column, but I often hide columns at run-time, and if hide them server side they don't render.
Well, it's weird. You CAN add a column, if you add it to the end of the list. And yes, you can declare the columns statically in markup and then hide them. But what you can't do is insert columns at runtime into the middle of the list. For instance, we have an app where we have a few columns that need to be on the left, so we declare those statically. Then we have a few columns that need to be on the right so we declare those statically. But then we have a few dynamic columns that are determined at runtime and need to be in between the 'left' and 'right' columns. And this doesn't work. So we are forced to just declare the 'left' columns in markup, and then at runtime we build and add the dynamic columns to the end, and then we also build and add the 'right' columns to the end. It works, but it's kind of a kludgy. The GridViewColumnCollection class has an Insert method, but it doesn't seem to be of any use. I'm kind of surprised this slipped through because normally microsoft is very thorough, but I guess this is why everyone pays for Infragistics and Telerik controls.