MVC3 Razor and Knockout in VS 2010? [closed] - visual-studio-2010

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 9 years ago.
Improve this question
I'm now diving into MVC3 with VS 2010 and looking at a few front-end frameworks. It looks like Razor is the standard for front-end integration, but I'm not too familiar with how something like KnockoutJS fits into this. My impression is that it is a data container that gives us observable collection functionality on the Web - not having to develop in Silverlight, for example, to make use of this functionality.
Looking at the Mix11 Video presentation of KnockoutJS, I'm once again guessing, that based on the jQuery integration capability, that we could simply replace jQuery with any other front-end library, such as Razor.
Is there any plan on integrating this into VS?

Razor is a back-end technology which works at the server side to render your HTML pages.
KnockoutJS on the other end is a pure client-side technology for UI-binding.
How they fit together?
At the server side you do all your business logic etc. and get's some data to display it to the user. Now how this data will be transported to user and displayed in HTML is something improvised through Razor. It helps you to incorporated dynamic data in your HTML pages. This also includes saving information in Javascript variables incase they are required at the client-side.
Once the HTML page + all Javascript is sent to the client side, the page is rendered by the browser and the Javascript kicks in to improve page's usability and interaction. Here KnockoutJs (which is essentially Javascript) comes into play and you could use it improve the usability of your pages through binding HTML elements to Javascript variables. At this stage, Razor has no role what so ever to play.
I hope this makes sense.

Related

What kind of websites are best suited for Google's AMP (Accelerated Mobile Pages) [closed]

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 5 years ago.
Improve this question
I recently learnt about Google's AMP project. I currently work on an online classifieds application, that has some client side JS. I understand that it's mostly content sites like Blogs that use AMP.
My question is this - are there any advantages or is there any need, for other web applications(e-commerce etc.) to sign up for AMP?
AMP pages (like you mentioned) are great for content heavy site like blogs and news sites. The MAIN advantage to AMP is that it will load your page much faster on a mobile device. You would have two version of each page, the regular desktop version and then it's AMP equivalent.
AMP pages have tons of restrictions which allow the page to load much faster as all of the layout calculation are done before any rendering to the screen, but the limitations are why AMP pages don't work well for e-commerce.
No external authored JS files are allowed unless AMP-IFRAMED. Custom css can be placed in your AMP page but must be included into an AMP custom style tag, cannot contain any wildcard selectors (*) and is limited to 50k.
All request from an AMP page must be made via HTTPS as well.
These are just a few of the restrictions and I suggest if you're at all interested in pursuing AMPing your site, read everything you can first. Here is a good page that will answer a lot of HOW TO questions. TURN your AMP up to 11.
Good luck!

Advantages and Disadvantages of using ReactJS [closed]

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
I am new to using React for development.
Can someone list the advantages and disadvantages in using ReactJS.
Are there any performance issues with using this library for large projects.
Advantages of using React:
easy to know how a component is rendered, you just look at the render function.
JSX makes it easy to read the code of your components. It is also really easy to see the layout, or how components are plugged/combined with each other.
you can render React on the server-side.
it is easy to test, and you can also integrate some tools like jest.
it ensures readability and makes maintainability easier.
you can use React with any framework (Backbone.js, Angular.js) as it is only a view layer.
What is not so good about React?
it is only a view layer, you have still to plug your code for Ajax requests, events and so on. Some people get surprised by that.
the library itself is pretty large.
the learning curve can be steep.
If react-native is really how it was described, react is going to become even bigger.
Performance wise, it is really good as it relies on a virtual-dom to know what is really changing in your UI and will re-render only what has really changed. It does have trouble with very large, slightly changing, lists of children (2000 <li> test), but can be optimized simply.
If you are not sure, just think about the big projects using React:
instagram, hipchat, facebook chat and so on.
Some resources:
React for the stupid people
Rebuilding Hipchat with React
Why React?
And probably one of my favorite blog post Why React is awesome?

Orchard and the Dashboard UI, "friendlyfy"? [closed]

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 just started to investigate Orchard for the 5:th time, and I thought that I might want to give it a fair chance.. however.. there is one think that me and my collegues simply cant get our heads around.. why is the UI so "techy"?.. For instance Umbraco has a very clean and simple Admin UI thats mostly understandable by anyone (even "none tech" persons)..
So my question is basically, is there something that we are missing?.. is there any user advantage to the Orchard Dashboard UI over the Umbraco UI for instance, or is there any module thats a "must have" to make the UI a bit more familiar?
Every time i have a new orchard instance, i always install the module Theme Editor
https://gallery.orchardproject.net/List/Modules/Orchard.Module.M33.SystemEditor
This module allows you to edit Views, JS, CSS inside of the cms itself. This probably complicates the UI even more however.
To answer your question, there is nothing to my knowledge to make the UI easier to adapt to. However if you spend the time to get to learn it then you realize there are a lot of very powerful things you can do with it and it is a fantastic example of MVC that is at your fingertips to modify to your hearts content.

Looking for an alternative to Telerik's MVC controls [closed]

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
I have a long experience of using a whole host of different tools from Telerik and, I have to say, I love them.
But I need an alternative. Why? Well, I want to start an Open Source project. The project will have a number of elements including an MVC frontend. Sadly, Telerik's licencing specifically prohibits the use of their components in Open Source Projects.
I'm going to need a number of components but most notably a Grid. Can anyone suggest a usable and worthwhile component set that I would be able to use in an Open Source project.
Any suggestions accepted.
Jquery UI (https://jqueryui.com/) is good but you should search for good components (thousands of ones can be found!). For example JqGrid for grid : http://jqgrid.com/ and . The main advantage is Jquery based if you are in love with Jquery. Also Visual Studio has it in its default project template.
Sencha ExtJs is great but a little different approach (it is completely JavaScript based and not JQuery based but it is a comprehnsive platform). Its control gallery is fantastic. specially for grid. check this : http://www.sencha.com/products/extjs/examples/
Kendo UI (latest telerik project) : I am not sure about KendoUI license but it think its JavaScript components are open source (although their MVC extensions are not free). check it at : http://www.kendoui.com

Html to pdf asp.net mvc [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to find a library/tool that would allow me to generate PDF from MVC views.
Any ideas, suggestions?
Regards
use iTextSharp for C# which is ported from iText from JAVA
check out
ITextSharp HTML to PDF?
I've created a project for doing this using iTextSharp, and published on bitbucket.
I override a ViewResult, to return a Pdf stream to the client. The pdf is generated in a MVC View (.cshtml file). And added some Extensions for the controller to make the experience smooth.
I have two options:
Create the Pdf from a "normal" view that returns Html. It's very easy, but you do not have "fine" control over the layout.
Create a Pdf using code, the layout code is in the View (using server side code). This is easy for customization, and testing. Because you do not need to recompile the whole project. Also IMHO the View (.cshtml file) is responsible for the layout, if the result is html or pdf does not mather, its still the view.
You will need to call RenderView to get the HTML result and then convert to PDF. Check this entry out for a similar solution
http://www.jimzimmerman.com/blog/2009/10/06/PdfResult+A+Custom+ActionResult+In+ASPNET+MVC.aspx

Resources