Monday, June 3, 2024
Homepage · c#
 Popular · Latest · Hot · Upcoming
144
rated 0 times [  145] [ 1]  / answers: 1 / hits: 46980  / 10 Years ago, mon, march 17, 2014, 12:00:00

I have quite recently started to connect a web platform that I work on to other quite complex systems mostly written in C#.
Most of my experience is in web development in PHP and JavaScript
And I also have some experience in writing web services in WCF.



Sadly I had experienced many difficulties in writing WCF services for my PHP web platform, slow development, very (very) complicated configurations in-order to respond well in JSON and to work RESTful and more.



Naturally I started looking around at other technologies, one in particular caught my eye Node.js which might be perfect for me because I have quite a lot of experience in JavaScript and that way I won't need my windows server anymore.
My other option is of course to keep writing services in C# but switch to ASP.NET Web API instead.
The switch will probably be much easier than from WCF to Node.js.



Any thoughts or suggestions in the matter?
Does anyone have experience in writing web services in Node.js and can point me in the direction of a good tutorial? or am I way off and I shouldn't be using Node.js for web services at all?


More From » c#

 Answers
24

I have just recently started working on express.js. Let me tell you it's not for the fainthearted. The whole mentality of If you are already familiar with JS then that's half the battle. really couldn't be further from the truth. I.E. if you are a hardcore devops guy like me.



I have a unified build process for all my asp.net application build, test and coverage reporting, deployment, configuration management and code quality analysis all setup and automated. It takes me literally 5 min to setup a Build process around a new project and have it tested, analysed, staged and shipped off to a production environment. (And really so should all the devs in the world. But hey, who am I kidding.) Then there's the monitoring, logging, performance analysis and profiling. Again all well unified, orchestrated and centrally managed.



I'm not saying node.js/express.js doesn't have those, but you have to develope/learn a COMPLETELY NEW set of services and platform just to run node.js.



Hammering out a bunch of code is one thing. Running a production system on a foreign technology is something else altogether.



Unless you looking for trouble ahem i mean, challenge :D, stick to WebAPI. WebDeploy is a god send.



BTW. Use BasicHttpBinding with your WCF endpoint and get PHP to generate the client class from the WSDL. Yes. Soap is your answer, not an easier to use rest. Something like https://code.google.com/p/php-wsdl-creator/. Archiving the WSDL from the WCF endpoint also allows you to track with pin point accuracy of your service signature and format changes. It ensures type safety, and handles ser/de for you. I don't care much about how ugly the message looks if I don't have to deal with it. And yes I have done it before with PHP and python. Works flawlessly.


[#71940] Sunday, March 16, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sonja

Total Points: 541
Total Questions: 113
Total Answers: 114

Location: Anguilla
Member since Sun, Jan 29, 2023
1 Year ago
sonja questions
Mon, Nov 30, 20, 00:00, 4 Years ago
Sun, Oct 11, 20, 00:00, 4 Years ago
Thu, May 21, 20, 00:00, 4 Years ago
Sun, Nov 10, 19, 00:00, 5 Years ago
Mon, Aug 26, 19, 00:00, 5 Years ago
;