Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
What's the best way to push info from a server to a web client? I know it's possible to setup sockets with Silverlight and Flash but I want to stay way from those two technologies.
Gmail seems to do a great job of polling the servers for updated emails and even their chat programs work great (all working in my web browser). Any ideas on the best way to do something like this but using asp.net?
Edit:
If I have to poll, i'd like to poll the server every 2 or 3 seconds. So I'm not sure how to do this without bringing the web server to it's knees under heavy usage.
Since you mention ASP.NET you should be using SignalR.
See my other answer here: Instant notifications like Facebook
The push technique you are looking for is called Comet. See this article for some pointers.
I would create a script callable Web Service and use JQuery.
Here's a good guide on using JQuery to call an ASP.NET (ASMX) web service:
http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/
Now, you would just poll this web service at whatever interval makes sense for your application.
Also, the problem with ASP.NET AJAX is it's a bit top heavy. By using JQuery, you can call your web service from a regular ASP.NET web form, from a View in MVC, or actually using any other web technology (classic ASP, PHP, whatever) all from the client side using just, in my view, the best javascript framework around. :)
Try out WebSync, a scalable comet server built for .NET/IIS. It'll let you push data nicely from the server, and integrates super easily with ASP.NET projects (a couple web.config entries is all it takes).
PokeIn is a reverse ajax library for ASP.NET & Mono. It has various capabilities like .NET to JSON vice versa. You may download sample projects from here
To do that, use ASP.NET 3.0/3.5 or if you are using earlier versions, use ASP.NET Ajax. However both examples listed by you, are using Ajax to pull information, not push it.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
My team is building a new application architecture where the bulk of our logic and processing is going to be on the client using Angular.js.
Our limitation is our server, specifically we have no access to our web-server and stuck with currently only having the ability to use .net/IIS. Our server is configured with .net 4.0, although I may be able to push for an upgrade to 4.5.
Our last project we created a WCF4 configure-less setup to create our RESTful services. This solution was workable but I was hoping there might be some better frameworks/APIs available now to set up the lightest possible .net server.
We focus primarily on our javascript so we have fallen off in our .net knowledge, so what is the current "best" or most used .net RESTful service solutions out there?
I would look at ServiceStack : http://www.servicestack.net/
I've used it for a few projects and I can say that you can get up and running very quickly, especially if you start with one of the tutorials or example packages (of which there are plenty). It's plugin-based architecture means you can buy in to as many or as few of the built-in features that it has, including authentication, authorization, and session management. It also "plays nice" with MVC, so if you have controllers that also want to use features, such as the built-in authentication / authorization and session management features, then it's a snap.
It was built with efficiency and speed in mind. It uses the best of the best when it comes to third-party libraries that it uses. Everything is well thought-out and planned.
Asp.net's Web API is the latest and greatest that Microsoft itself offers in building simple REST services. You can leverage the simple-but-extensible routing structure of ASP.NET MVC, and define your services using simple MVC-style controller actions that return plain old C# objects, which get serialized into JSON results.
I can't speak specifically to the "lightweight"-ness of Web API: it's likely that ServiceStack would perform better. But in terms of keeping simple code, but still having the flexibility to do more advanced things when you need to, Web API has a lot to offer.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am about to make a new Web application. My PHP skills are a little above average - I would'nt put myself under enterprise level coding. However my Classic ASP skills are strong and I have programmed VB in Classic ASP before for powerful websites.
I am going to make a ad network market place - buying and selling ad space online. It would be CDN backed with CDN JS and CDN image distribution with DNS and load balanced mySQL cluster servers.
What are everyones thoughts? I take it, Nginx can't run Windows?
Classic ASP to note, IMO, still handles and performs well on some sites. My concern is for future and speed and performance. Security on Classic ASP and PHP - well, Classic ASP with VB wins for me.
Even if you know Classic ASP better than PHP - Classic ASP is obsolete for nearly ten years:
It [ASP.NET] was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology.
I wouldn't start a new project with a technology that is ten years obsolete.
I don't know if Nginx runs on Windows, but it's definitely possible to run PHP and mySQL on Windows. There are Windows installers for mySQL, and it's even possible to run PHP on IIS.
Why is this even a question? Classic ASP is obsolete. When do you expect the next version of Classic ASP? When do you expect even the next patch?
Now, ask yourself the same questions about PHP.
To paraphrase an old "TV Guide" advertisement, "Get it? Got it? Good.".
I would recommend neither of the two, and would go with ASP.NET MVC. It's closer in pattern to Classic ASP, and I believe you can even program it in the same pattern - don't use a model, use a single controller that takes the view name as a parameter, and do all the work in the view.
A lot of people still use classic ASP all the time. So if your strengths are there, go ahead and use it. I know I still have to use it every day.
That being said, if your skills are that strong in ASP, you should have no problem moving to PHP. A couple of hours with a good code book will help you get through. Here is a basic cross-reference guide to ASP and PHP.
http://www.design215.com/toolbox/asp.php
The question invites a pretty subjective answer. However, I'll try to be objectively subjective.
Since 5.3, PHP is the best choice in my opinion.
Also, if you're really intending to build it for scalability, I'd suggest looking at a cloud service like Amazon Web Services for your server (EC2), CDN (S3 + CloudFront) and database (RDS). If you're considering going as far as using Nginx there are some good configuration options at http://scalr.net/ for working with a few different clouds, including AWS.
My recommendation would be PHP, coz it scales well, has a large community support, wide variety of IDEs and editors, robust frameworks and wide spread usage as a choice web development technology. My experience with ASP was long ago and was quite cumbersome, but PHP with all the said features and more like fully OO, works nicely. PHP as of now is on steady footing in web development arena.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I plan on building a simple, yet high usage webapp and need to settle on an architecture.
basic server side logic / dynamic db
driven content about half a dozen to
a dozen pages serving up all said
content
no need for URL rewriting,
pretty simple page flow/routing
The objective is to publish this app to use the least amount of bandwidth, memory, and CPU as possible. That said, my options are to
build in ASP.NET MVC
build in webforms with viewstate
disabled
build using .ashx handlers with code
that concatenates all HTML output
into strings that it spits out
Which is the most lightweight solution?
I appreciate the responses so far, but i'm not asking for the best solution. This is a simple app, and i want the solution that will use the fewest machine/network resources.
HttpHandlers are the most lightweight from your list of 3 options.
Personally, I would use ASP.NET MVC because it gives you a richer development environment with very little extra server overhead, especially if u turn most things off ..
eg. roles, etc.
Also use IIS7 intergrated mode and turn as much IIS7 settings off etc.
HttpHandlers are the most light weight, because the interface behind the ASHX file is IHttpHandler which is the basis of the Page object that is used both for Web Forms and MVC.
Omit the third option because it is very hard to control the application if it is all built using HttpHandlers.
basic server side logic / dynamic db
driven content about half a dozen to
One of the major benefits of ASP.NET MVC is the ease of the separation of concerns. +1
a dozen pages serving up all said
content no need for URL rewriting,
pretty simple page flow/routing
ASP.NET MVC will give you an easy interface to set your routes, a lightweight,clear, and controllable views. +1
WebForms are going to be the heaviest in most cases. ASP.Net MVC is quite lightweight and surprisingly fast compared to WebForms.
Building an application using HttpHandlers to serve pages may be fast when serving static content, but if you plan to use some sort of templating to serve dynamic data, you're going to cause yourself a lot of undue work. As for performance, it's hard to say with this option because your templating could be nasty or possibly not.
ASP.NET MVC, Web Forms and the Generic Handler (.ashx) are all HttpHandlers implementing the IHttpHandler interface.
Out of these options the Generic Handler (.ashx) would be the most lightweight.
ASp.NET MVC is as close as you can get to HtTP and Html.
You should use MVC, because you have a lot of more control about the generated client code than in WebForms, and is simpler than ashx handlers.
MVC very much gives you more control over HTML produced. So, from a bandwidth perspective, it definitely has better performance. With this may also come conciseness of code to generate this HTML.
However, MVC doe not improve business/data layer, or database performance, it just separates them. If you want to analyze, having multiple layers does not improve performance, just the structure of the program, which in turn may lend itself to methods for adding more performance.
A down side to MVC is learning how to think MVC and learning how to use the framework. If that is not an issue, go for MVC, it will teach you some good habits, if you don't have them already.
And finally, HTTP Handlers are not really meant for being used in this way, they are for things like file proxies.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
What tools, practices, or documentation have you used in your conversion process that you would recommend to others?
You could try Microsoft's
ASP to ASP.NET 1.x Migration Assistant
The ASP to ASP.NET v1.x Migration
Assistant is designed to help you
convert ASP pages and applications to
ASP.NET. It does not make the
conversion process completely
automatic, but it will speed up your
project by automating some of the
steps required for migration.
I guess it's better than nothing.
We've converted a few ASP classic apps to .net, and are in the process of converting another.
What we did was first to split them into two groups - ones that we would convert completely, before replacing the old with the new, and then the ones we could convert incrementally.
For that second group, it was useful to build some header and sidebar controls for the app that also held some of the more programmy parts - security, navigation and such, and then use an iframe for holding the ASP classic stuff, in the areas we haven't gotten to converting yet.
It's been pretty painless, as we can pull out the old, and insert the new on our own schedule, rather than having to get the entire massive app rewritten before moving forward. It's also helped us be able to tailor the changes and new features to our customers' needs.
There is a quick and dirty way to convert from ASP to ASP.Net since ASP.Net supports inline coding that was used in ASP Classic. However, you wouldn't be taking full advantage of ASP.Net with that approach.
The bad news is there's no easy way to convert from ASP Classic to ASP.Net the "right" way. They are such different technologies there's no streamlined conversion process.
one is a scripting language and other compiled so the overall paradigm itself is completely different and I am really skeptical that there would be anyway to convert / migrate your app from classic asp to asp.net, if you intend to use asp.net the way its meant to be.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
A friend of mine's company is considering using either Java or ASP.NET for web development. Currently they do all development in Delphi. As they have no experience in .NET they have asked me to come down and give a 1 hour overview of .NET (mainly ASP.NET). What topics should I cover?
I was hired by a Delphi product company as a senior .NET developer with the goal of moving their applications from Delphi client server/desktop apps to web based ASP.NET.
I no longer work there but remain friends with an experienced Delphi programmer who is still there.
The biggest concern you have is ensuring that these Delphi programmers start to get their heads around the fundamental shift from desktop client server apps (very common using Delphi) to web based stateless, cross browser UI ASP.NET.
My friend from the previous company has said that the company is still struggling along with minimal .NET progress after 2 years. Technologies such as XML, Javascript, AJax and even fundamentals such as the .NET CLR and assemblies are still a bit of a mystery to the team.
In summary, if I was you I would be focusing entirely on bigger concepts such as the stateless nature of the web and how ASP.NET can solve it, and the benefits and drawbacks of thin client software (ie ease of deployment, browser incompatibilies, less rich user interfaces etc.)
Other than the other suggestions you are no doubt going to get, I'd explain to them that there is a Delphi for .NET which would ease the pain of change a little. So basically they are using Delphi as the language but the underpinnings of .NET.
You might want to talk to your regional developer evangelist. I'm sure they have a stack of bullet points for instances just like this.
You can find your local evangelist(s) at: http://msdn.microsoft.com/en-us/bb905078.aspx
There is so much to cover!
ASP.Net is better for Web Development though, It is designed for it. Take into account the following features:
Membership Provider
ASP.Net controls
The Whole Page and Code-Behind
system and don't forget ASP.Net MVC
ASP.Net Ajax and support for jQuery
ASP.Net peforms well generally, not
sure about Java though
Use .Net Librarys and languages, C#
or VB.Net and so on.
Many Many more
I would cover those, the way ASP.Net is designed as a much more complete package for web development than Java is. I also think the connection between pages and code is better in ASP.Net than using PHP/Java or how ever they would do it.
Can also switch to Winforms or other MS technologies relatively easily.
If they do want to explore C# the transition is pretty easy. Just remind them that Anders Hejlsberg was the Chief Architect of Delphi and C#.
http://en.wikipedia.org/wiki/Anders_Hejlsberg
I was a VB.net guy, but I took a one year Delphi gig a few years back. When I came back to .Net I was using C# and the transition was very easy.
Not sure if you're planning to give more of an architectural view or a more of hands-on experience (say, build a demo Hello World ASP.NET site), but anyway, here are some topics that might get them interested:
.NET covers many languages (C#, VB.NET, IronPython, IronRuby, Delphi.NET), even on the same solution; that means the developers can reuse some of their previous knowledge;
To support the item above, an overview of the CLR, IL etc might be useful, maybe comparing it a bit with how Java works
Visual Studio.NET is a great IDE, and there are lots of tools for it that support the latest best practices (TDD, IoC etc), including OSS
Could be also nice to mention Mono (maybe show them the same app running on Windows, MAc and Linux?) and ASP.NET MVC, in case your teammates have some knowledge of what MVC, RoR are about
I will think some more... :)
First off I'd give them a tour of creating a simple web app using Visual Studio and whatever the equivalent would be in Java. Seeing it done speaks a lot more than just giving the theory.