As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know my way around the basics of KnockoutJS, and i can easily make a single page really dynamic... But i am to build a new web application, and i'm looking for advise on how to make making the entire webapplication dynamic where every viewModel and html-template is loaded dynamicly, with no full page requests, but the URL should still indicate what page i am on, eather with a hashtag followed by a path, or something better?
I'm a bit confused:
Is there some framework that plays nice with knockoutJs that helps
achive this?
Can i achive this without worring about KnockoutJS?
Is it just a matter of tweaking the viewModel to dynamicly load and dispose other viewModels
and templates, in a smart way?
What is the best practis, what do i do?
Any pointers, links or tips on this is much appreciated, thanks!
Here is an example, notice how the URL changes, and the new content animates in, how do they do it?
https://www.pokki.com/app/Little-Alchemy
Btw. I use ASP.Net MVC.
There are a few things you are asking for here.
Routing framework
External templates.
There's a simple plugin to help you with the latter: Knockout.js External Template Engine
For the former, there are some routing frameworks available that play nicely with KO. You still generally need to do something with the fetching/creation/disposal of child ViewModels. The routing framework may help you with this, or it may just handle monitoring the events that would normally cause a navigation, and call functions that you supply.
I'd like to see a full drop-in routing framework that allows for more declarative definition of url → ViewModel mapping, but haven't found anything that is truly easy as yet.
The one I have started using is called Path.js, but you still have do do a fair bit of glue code.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am an entry level programmer with only a few months of experience.
Yesterday I was discussing with a colleague how we can improve the performance of a project we are working on together.
The project is built with C# + Ext.NET + JS
The plan was to move as many things as possible to client-side JavaScript instead of interacting with the server all the time.
I thought this was a good idea, but couldn't help but wonder if there is a point where bringing everything to client-side starts making the web application slower. I understand that interacting with the server and reloading unnecessary data all the time is a waste of time in most cases, but I've also seen websites loaded with so much JS that the browser actually lags and the browsing the web application is just a pain.
Is there a golden point? Are there certain 'rules'? How do you achieve maximum performance? Take Google Cloud apps, such as Docs for example, they're pretty fast for what they do, and they're web applications. That is some very good performance.
JavaScript is incredibly fast on the client-side. I assume Ext.NET is like AJAX? If not, you can use AJAX to communicate with the server using JavaScript. It will be pretty fast configured like that. However, the style of coding will change drastically if you're currently using .NET controls on the DOM with click events.
My 2 cents: Use lazy loading of xtypes whenever possible on the client (ie. you can define an xtype but it is only instantiated when it is needed). Especially if those xtypes make ajax calls!
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to build a nice looking UI with Silverlight, something that keep moving in a delicate manner (like this intro)
I know of course this is possible through the Animation features of Silverlight, but they seem to me a bit too exhausting. I'm looking for some ready-to-use UI animation.
As I recall, jquery offers quite a few UI menus (etc.) that are really easy to use.
I've searched quite a bit for effects library, or tutorials, but I couldn't find anything helpful.
Is my only option is writing Storyboard and build my animations from scratch?
Is that considered OK or I'm just reinventing the wheel here for no reason?
Does it make jquery a better choice for fancy UI web applications? (I've never used it , just read about it)
Storyboards and animations aren't that bad to learn. They are daunting at first (because they can be verbose), but if you just take some time to understand them, they are fairly straight forward. You can try some third party control suites like Telerik which have some animation/transition functions but I'd suggest diving in and understanding how they work.
The best way to try to learn the animations is to think of what you want to do first (something simple) and then just research/figure it out. Googles great for this! Do somethign easy at first of course.
View the sample Silverlight animation browser at microsoft to get started... Sample Animations
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am currently developing a ASP.NET MVC4 website, and I would like to know whats the best practices storing the logged-on user's data (include privileges) and authorize the user securely, being able to access this data in both my views and controllers.
One thing to important mention - I am NOT using the Membership class (I've saw that its an overhead for me to use it, and I would like to implement the exact things I need and learn from the process).
The only way I thought to do it is storing all the data inside the session object, and having a wrapper to the session object (static class) and use it like SessionManager.IsLoggedIn(), SessionManager.GetUserPriviliges() or simply creating a method that returns hard-typed UserSessionData SessionManager.GetSessionData() that contains all the data required.
This is one way to use it in both controllers and views. Shall I derive from Controller and create a RolesController which stores UserSessionData so I won't need to call it again and again in my controllers?
I guess I won't be able to use the common AuthorizedAttribute so I will have to implement it by using the session wrapper (Is it safe to use only the session data? since I am not using the 'official' authorization method and therefore I don't really know how it should be implemented).
As you see, I have an idea but since its my first time doing it I would like to learn about the best practices and the way it should be done correctly. I will be thankful if you will explain your answers since I want to get the complete idea and I haven't done it before in MVC.
Thanks in advance!
It is not safe to do anything you've described. Static classis are dangerous in asp.net because they are not multi-user safe. Static classes are shared between all threads in the app, including threads running other users requests.
Just use the default mamebership until you know what you're doing. You will just be creating a vulnerable architecture otherwise.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am starting my first software engineering job in a week and wanted to sharpen my skills up. I'm looking for someone to suggest a good week long, web application project that can help me sharpen up my C#, Javascipt, and JQuery.
Thanks!
Brandon
Edit: As noted below this is a pretty broad question. Let me give a little more background. I am a strong programmer, but an entry level one. My experience as an intern for a year gave me glimpses into a number of the .Net and C# technologies, but what I have never done was put them all together into an inclusive project. I'm looking for a project idea that will have me setting up both client and server side code (purely for practice) that will provide me better insight into how each piece of the puzzle fits together.
write a blog engine. its useful, easy, and has bounded, easily understood requirements.
You could start with one of the ASP.NET Starter Kits and build upon it.
Being that you have C# experience, I highly recommend trying Asp.Net MVC as I feel it is the future of MS Web programming (I am not alone in this opinion... though it is just an opinion).
If nothing else, the MVC (model-view-controller) organization is a well established and useful method of coding that is used accross all sorts of platforms like php, ruby on rails, etc. - not as much of an 'island' like Asp.Net WebForms (Asp.Net WebForms are still great).
There are all sorts of great tutorials, the most famous being Nerd Dinner
You might also want to check out the materials available under the jquery tag on Channel9. There is a great video from PDC2008 that talks about ASP.NET and jQuery and another jQuery for the ASP.NET Developer presentation from DevDays 2010.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm looking to create a dashboard type gui for a web application. I'm looking for the user to be able to drag and drop different elements (probably either image buttons, anchor tags, or maybe just divs) to different (defined) places and be able to save their setup (in a cookie or on the server). I'm working with c# in the .Net 2.0 framework. I've tried using mootools but their recent update has left their drag/drop capabilities un-useful for me. I'm looking for a bit of direction because I know there is something out there that is just what I'm looking for so I wont have to build from scratch.
Thanks.
I have been looking at this kind of functionality myself recently and have decided on using jQuery with the help of jQuery UI. I came across a large amount of information that also suggested Yahoo UI (YUI), I had already started learning jQuery due to the AJAX support that it offers, so I stuck with it.
jQuery UI Site
jQuery UI Documentation
Example of a drag and drop screen layout with jQuery UI
Introduction to jQuery UI
If you decide to use the YUI javascript library, here is a link to a vast amount of videos to help get you started.
http://developer.yahoo.com/yui/theater/
If you still want to give MooTools a second chance, I'd recommend taking a look at Mocha UI.
I prefer using jQuery for AJAXy stuff like that. It also has a lot of very good plugins that make writing client-side code very easy.
Here is the plugin page specifically for Drag-n-Drop.
http://plugins.jquery.com/project/Plugins/category/45
Ajax callback are also very easy so saving the setup should be fairly easy as well.
I used the Microsoft ASP.Net Ajax and AjaxControlToolkit to do something like this. They have a ResizeableControl and a DragPanel. I used these, then hosted an IFrame inside the panel to display the content.
Worked pretty well.
This site:
http://www.asp.net/learn/videos/default.aspx?tabid=63#ajax
Has lots of tutorial videos that show you how to get started using the controls.
You might want to look at DropThings on Codeplex.