Why are a lot of new generation websites not fully SPA? - single-page-application

Its really easy to have websites fully in javascript without having to do any page reloads between urls thanks to HTML5 location and frameworks like Angular. Why do new websites not completely go with no page reloads?

There are several reasons why someone would not want to, all of which are opinion based so there is no true correct answer to your question. Some of the reasons include
Not wanting to adopt new technologies. After all the old technologies work fine.
Server side rendered sites typically will still mostly function with javascript disabled
With a SPA typically you need to use something like pre-render.io or some advanced prerender system that uses browser versus server variables to tell if you are rendering from the server or browser.
You are making an API
You are making a very simple app that does need lots of components and advanced functionality
SPA technology could quite frankly be considered unstable because there is no clear way to implement it perfectly with many solutions. Older technologies may be considered more bug free like python which has been stable and bug free for over a decade. Spa technology is being continuously developed and improved with no clear path to completion. Many people will not invest the time in it because they do not believe it will be the web 2.0 solution.

Related

What is a good easy to use framework for rapidly developing web apps with a C# backend?

I am after recommendations for a framework (or project template) for rapid application development using C# on the back-end. It must support the following:
User login/authentication
SPA
Responsive client
Easy to understand client and server (not a steep learning curve like AngularJS)
Clean/uncluttered project structure (both client and server). Some OOTB ASP.Net project templates are very cluttered (eg the the VS2012/2013 SPA MVC/Knockout/BackBone template) - maybe I could be convinced, but just looking at a new project it puts me off instantly.
Easy DB access.
Flexibility on the client (for custom functionality eg adding maps and other UI libraries like D3) - don't want a client framework that you have to wrangle to paint outside the lines.
Would appreciate any/all suggestions/opinions.
Thanks
Tim
Like anything in software, there are so many ways to do this. You are essentially asking for a complete system architecture. You could try to be more specific, but your question is going gather opinionated answers and this will probably end up getting closed.
But I'm bored and will throwin a couple of pennies before that happens:
C# most likely means you'll be going .NET on IIS (though maybe its docker on linux?? refer back to my first line above)
User login/authentication
If its IIS, you could be running Windows Auth, or if in an enterprise, Kerberos or Federation. Or if its going against social sites, maybe OAuth? This one depends on what authentication your users need and is really separate of the other areas below.
SPA / Responsive client / Easy to understand...
You listed some very popular frameworks (Angular/Knockout) used in modern SPAs. You may not like them but these are becoming industry standards. Responsive web is pretty much bootstrap or foundation. Though, angular material seems to be gaining popularity too.
Easy DB access.
Whats your definition of easy? Looking for an ORM? If so, Entity Framework is popular in .net apps. Or if you are more of an SQL person, maybe LINQ is easier. Many options here too.
Flexibility on the client ...
Though you may not like some of them, using popular frameworks means you get a lot of developer support behind it - and a lot more answers here on SO if you have problems. One man's sunset is another man's sunrise. What you consider difficult might be viewed as easy by another. Hard to say whats most flexible but going popular means you got more help.

Why do websites like Classcraft not use Meteor for their Frontpage

I was looking at some larger scale Meteor applications and was wondering why some of the initial sites do not seem to use meteor.
As an example when you go to classcraft and look at the main website you notice it is not using meteor.
Then when you go to their actual application (click signup for example) you can see it uses Meteor.
So they make a clear separation in terms of technology. Can someone explain the reasons? Is it not as efficient / clean to just use Meteor for the whole thing.
Thanks,
Jean
Each company makes their own decisions on how/when/where to use technologies. In the case of meteor, the really strong part of meteor is that it's real-time updating. That means things like messaging systems, getting updates out quickly, etc. good uses for meteor.
It appears as though classcraft has decided they don't need that capability on the home page. There's also some concerns with SEO and meteor that perhaps classcraft didn't want to deal with.
Finally the home page not being built in meteor shields the DB from public view, which is not a huge security advantage, but may be one they considered.
This is all me finding reasons for them as I don't know why they'd make that decision. I don't make that decision for my sites/apps but that doesn't mean others might not see things differently.
I'm the founder of Classcraft. To answer your question, it's because we didn't need everything Meteor had to offer for the front-facing website : reactivity, flexible templates, a database, etc. Meteor is amazing for building apps, but it's overkill for a static website. Also, if the front-facing website was built within the game app, it'd mean that any copy changes or tweaks to the front-facing would cause us to have to redeploy the app, which means some downtime (not much, but still) for our users. Keeping them separate also allows marketing people (who aren't developers) to tinker with it without going into the code base for the game.
We decided to build the front-facing website using middleman. Middleman allows you to generate a precompiled static website, which allows for amazing speed and simple server configuration (it's served from S3, which means it's super fast).
I'm sure the reasons are different for everybody, but that's what it was for us.
Shawn

What disadvantages/problems are there when integrating Joomla and ASP.Net web pages?

A friend of mine really likes using Joomla as a base for his websites. He also likes the power that Asp.Net has and can code in VB.Net.
He wants to use Joomla as the "Master Page" and Asp.Net/VB.Net/SQL Server to handle the main business logic of the application. He is planning on using the Joomla Wrapper Module (an IFrame, joomla modules) to integrate the ASP.Net into the Joomla website.
Joomla will be able to handle the security (users,roles,registration), menu (based on roles), static content (e.g. About Us page) and it will pass an Encrypted Username & Password to the Asp.Net web page (example here).
The goal of the website is to allow users to register & subscribe to a (free or paid) service where they will be able to customize content and download it as a file.
What disadvantages are there when doing this? Are there work arounds?
Some issues that I can think of are:
Links clicked in an IFrame won't change the browser's url which means that you can't bookmark pages and they aren't in the browsers history.
If Asp.Net has to know the users/roles (which is very likely) then it would have to access the Joomla database or keep its own user table which will have to be in sync with Joomla's users.
EDIT:
I would never build a new website this way, but I was looking for concrete points to convince my friend that using Joomla and Asp.Net together isn't a good idea.
I believe your friend's idea is fine. Both platforms have strong points. Joomla is a mature open source CMS platform that has an enormous amount of community contributed components and it is easy to use which makes it appealing. But I can also see instances where you may want to include ASP.Net functionality in certain scenarios. I have had clients who use Joomla but wanted an app I have written in .Net and it did not make sense to spend the time or money to rewrite it in PHP and MySql. The two can be integrated securely. I wish your friend luck in his endeavors.
I don't see what advantage you get from using Joomla when the app is ASP.net (nor the advantage of coding an ASP.net app when the framework uses PHP/MySQL).
I'm not convinced the security is tight because you can open iframes and bypass the Joomla security. Then you talk about passing username/password to the iframe - but now you need to validate this again through the ASP.net app.
I once coded an app in raw PHP and included it in a Joomla site using iframes. I realized fairly quickly that there was basically no security because the raw PHP had no knowledge of Joomla (although the app was not visible to site visitors and only known about by admin). I quickly recoded it into a built-in component.
To me, this sounds like you're reinventing the wheel on both sides of the app. If you want to use Joomla, either learn how to make components (it's pretty simple) and do it in PHP, or hire someone to do it for you ;).
If PHP is not your strong point, then use a full ASP.net site, perhaps with a CMS as GmonC suggested. Even creating your own basic CMS with some pre-built components (e.g. Telerik) would probably be quicker than integrating PHP and ASP.
Seriously, IMHO, if you're not going to integrate some legacy system or isn't doing this kind of "integration" development as an "experiment" to learn something - in a summarized way, if you just want to have your work done, I think the description you provided inserts a lot of complexity and overhead that aren't needed in the first place.
This added complexity of two completely different ecosystems is a disadvantage to what should be just simpler. I really believe you should try to use Joomla or other CMS written in .net like dotnetnuke (or build your own) instead of this configuration.
If you add more information about what are the goals and objectives of this project, my opinion may change. Until them, I keep my opinion of simplicity.
The time and effort you are going to go through to use Joomla is going to far outweight what it would take to just get some other CMS that was designed for .NET.
Stop over-engineering yourself into a midlife crisis.
Also, Joomla? Seriously? Joomla?
me too don't get any advantages for joomla, it's big system and it just as good as wordpress for regular projects, just wordpress is much simplier. joomla has no good documentation to learn and hard to extend.

What are other ASP.NET web applications that are as well done as StackOverflow?

It's my understanding that StackOverflow (SO) was built using ASP.NET. What surprised me is it's so well designed and well implemented. Without knowing much about the internals of SO, here are my observations and educated guesses:
SO appears to be highly scalable.
URLs in SO are friendly.
It appears that SO does not contain a bunch of controls as most ASP.NET apps I've seen.
Judiciously and effectively use of Ajax requests, opacity animation, etc. Viewing source tells me SO is using jQuery.
SO runs on all major browsers (that I've used and this list includes IE, FF, Chrome, Opera).
Edit: 6. Comet-like feature: As you type your answer, if there is any other answer posted, you get the notification. If you choose to load it, of course only a partial page refresh is done and your answer remain intact. Have yet to see this in any other ASP.NET app.
So my questions:
What are other ASP.NET web
applications that are as well done
as StackOverflow and what are their
features that you like?
Can you share
about some more details about SO,
for example is SO built using
ASP.NET MVC or something else?
SO is built using ASP.NET MVC as explained by Jeff Atwood and his team in this podcast organised by Scott Hanselman
Listening to the podcast would be worthwhile.
One surprising element about SO which was revealed in the podcast is that SO runs on a single server (IIS & SQL Server). I was surprised by this.
ASP.NET Forms allows developers to build UIs in much the same way as .NET Windows Forms.
The whole idea was that a developer that knew how to build a 'Fat Client' Windows form could transfer those skills to ASP.NET forms. ASP.NET forms even allowed developers to pretty much put code on the same set of control events. The developer was sheilded from having to have any knowledge of HTML, HTTP, Javascript etc.
Unfortunately this resulted in large POSTs containing monster viewstate being generated frequently and hence a poor user experience. This is what has given ASP.NET a bad rep. In reality its the original ASP.NET Forms that should have the bad rep.
ASP.NET MVC, amoungst other things, embraces the nature of HTTP rather than trying to hide it. AJAX and JQuery are also features of MVC which add to the overall result being better.
That said having a great tool is useless without great vision, design and skill, the SO team clearly have those in abundance.
Orkut.com - A social networking site by google uses ASP.NET
SO was build with ASP.NET MVC. Jeff hired good developers, had a good vision, and ran his screens through a real designer.
Myspace.com uses ASP.net, which proves the scalability of the platform in general. You can also learn a lot about stackoverflow itself from reading the stackoverflow blog and listening to the stackoverflow podcasts.
Many of the things you point out about are actually due to the use of ASP.NET MVC. Pretty URLs come out of the box, non-standard controls, well nothing comes out of the box with MVC so you have to reinvent everything :), and finally the AJAX is pretty much a requirement for ASP.NET MVC if you want to do anything intelligent with it.
ASP.NET MVC alone does not account for the things which makes StackOverflow truly successful that's all down to the idea, execution, and the fact that Jeff and Joel combined garners a huge following on the net.
You can also learn quite a lot about the development, planning(!), etc in the two HanselMinutes podcasts on SO:
StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team
Behind the Scenes - StackOverflow and Jeff Atwood - Part 2
Available in numerous audio formats, as well as transcribed.
ASP.NET creates websites limited only by the talent of the developers.
The same can be said for virtually any framework.
That said, Windows Server/IIS/.NET is a hugely scalable concept, as we serve far far more traffic than SO on a ASP.NET site (Then again, we have 32 servers).
As mentioned in one of the answers here, myspace.com uses ASP.NET (as far as I know it was written in ColdFusion and used BlueDragon for .NET).
One other site is plentyoffish.com (60M hits per day).
If you want to read more about scalability see http://highscalability.com

Using Silverlight for an entire website?

We need to build an administration portal website to support our client/server application. Since we're a .Net shop the obvious traditional way would be to do that in ASP.Net. But Silverlight 2 will be coming out of beta a good while before our release date. Should we consider building the whole website in silverlight instead, with a supporting WCF backend?
The main function of the portal will be: users, groups and permissions configuration; user profile settings configuration; file upload and download for files needed to support the application.
I think the main reason for taking this approach would be that we have good experience with WPF and WCF, but little experience in ASP.Net. Either way we would have to learn ASP.Net or Silverlight, and learning Silverlight seems a more natural extension of our current skills.
Are there any big no-nos from the experience of StackOverflowers? What are the big positives?
I would recommend against building a pure Silverlight site.
Silverlight suffers from the same issues as Flash does: Unintuitive Bookmarking, issues with printing, accessibility issues, not working back buttons and so on.
Also, you would require your users to have Silverlight installed or at least to have the ability to install it.
In controlled environements (eg. in large companies or health care) or on mobile devices, this might not be the case.
I would definitely go for a full Silverlight application, specially if you have good experience from WPF. You will be able to reuse your knowledge from WPF, and should be able to pick up Silverlight fairly quickly. I've been working with Silverlight since Beta 1, and the current Beta 2 is of solid quality. I guess it's safe to assume that a RTW version is just around the corner.
Pilf has some valid point, specially around printing. For that I would probably use SQL Reporting Services, or some other reporting framework, on the server side, and then pop up a new window with printable reports. For linking and bookmarking the issues are no different than any other AJAX application. I did a blog post today about how to provide deep linking and back-forward navigation in Silverlight.
Silverlight also has all the hooks needed for great accessibility support, as the UI Automation API from WPF is brought into Silverlight. I don't know if the screen reader vendors have caught up yet. The styling/template support in Silverlight makes it easy to provide high-contrast skins for visual impaired users if that is a concern.
Depends on your goals. If administration portal is part of application and will only be used from computers where your application is installed, there are plenty of advantages of going fully Silverlight - or even WPF.
But if you can see a scenario where it will be used either from random PC or by random person, fully functional HTML/Javascript version is absolutely necessary.
Some reasons are:
Most people don't have silverlight and you'll earn a good load of swearing if they have to download and install it. Some people who have it installed keep it disabled (together with flash and sometimes even images) to avoid distractions and speed up browsing.
When HTML site fails, user gets error page and reloads. When silverlight fails, it can hang or crash.
HTML is what is expected - both by users and web browsers: back and refresh buttons work as they should, hyperlinks and forms work as expected.
Slow internet is still very common, both in remote areas and mobile devices.
I agree with what everyone had said so far and I think this Flow Chart, which is aimed at Flash, also applies to Silverlight.
Source of Image
It sounds like your problem is that you need a rich-client admin application. Why not use click-once?
On the topic of remote andministrators, another poster stated that was an argument in favor of HTML if the admins were on a slow connection. I would argue that depending on the type of information, it may be more efficient to use Silverlight. If you have an ASP.NET datagrid populated with server side data binding, you can be downloading a ton of markup and viewstate data. Even if you're using an alrternative to DataGrid that's lighter on the ViewState, you will still have a lot of HTML to download.
In Silverlight, once you get the XAP down, which is probably going to be smaller than the corresponding HTML, the XAP is cached and so you shouldn't have that cost every time, and you'll just be retrieving the data itself.
For another example, let's say you have a bunch of dropdown lists on one of your forms which all have the same values in the list. In Silverlight, you can get these values once and bind them to all of the dorpdowns, in HTML you will have to repeat them each time.
This will get better with client side data binding in ASP.NET, which follows a very similar model to Silverlight and WPF for data binding.
Overall, I would also think that you would need to write less code for the Silverlight implementation which can increase productivity and reduce maintenace costs.
ASP all the way. You should only use silverlight/flash etc when text can't do what you want it to do - e.g. display video.
Using a plugin for your website makes it slow, and requires the user to have the plugin installed. Silverlight for instance rules out all Linux user. Also, since Silverlight is pretty new, there is no telling how committed Microsoft will be to keep the platform alive if it doesn't pick up soon.
I'd stick to plain old HTML with server side scripting.
Also, for public websites: Flash and Silverlight can't be indexed by any search engine, so good luck with writing tons of metadata if you want any visitors at all.
Silverlight is a good choice for an internal-facing portal, just as it would be for a public-facing portal if you've already evaluated your project and have decided to go forward with a web portal. You are free to integrate Silverlight components within an existing ASP.NET application (i.e. the "islands of richness") approach, but if you have the ability to build a new project from scratch, don't discount a completely Silverlight solution as a valid choice where you would have went with a traditional ASP.NET portal. Silverlight is RTW now, so if this decision is still on the table, you know you won't have to deal with breaking changes going forward.
There are some downsides with developing a site completely in Flash / Silverlight, but if those downsides won't matter to you or won't have an impact then there is nothing stopping you. Choose whatever tool you think meets your needs more fully. I wouldn't be put off creating a site purely in Silverlight based on the downsides, because it brings a lot more positives to the user experience.
The previous comments have dealt with most of the downsides of using Silverlight for a site like this and I agree. If you're determined to have rich-client style development and your audience is small (for admins only) then I'd probably recommend WPF over Silverlight as it currently provides a richer set of tools and controls.
If you stick with ASP.NET have you looked at Dynamic Data - it's ideal for building backend management sites with little effort.
I've seen "Silverlight only" websites at Microsoft and they are pretty impressive. But again, the demos were there to exploit the full potential of what Silverlight can do. The moment you need something different you may be out of luck. I don't see Silverlight like Flash except in the way they are installed/seen. But the Flash/ActionScript backend is really bad compared to what Visual Studio can offer with .NET
Ask yourself why would you like to use Silverlight? Fancy effects or programming model?

Resources