I am working on a Zendframework 2 project. I need to implement access control in to my application. This is my first time with zf. When I investigated about ACL i came across 2 modules ZfcRbac and BjyAuthorize. I am confused.
My Question is Should I use these both or either?
ADDITIONAL : If either, If any body know any blog post or article comparing the pros and cons of both, please suggest me.
Maybe this will help you with your decision:
Instant ACLs with Zend Framework 2
Related
I'm trying to convert one of my current MVC sites to using requirejs.....I was able to get things to "work"....but, what I have done looks messy.
Everything I have found on the internet in relation to requirejs really concentrates on single page apps [e.g., John Papa's Code Camper]...HOWEVER, in my case, this is a multi-page app.....and from what I can see, the "main.js" methodology really is only useful for SPA.
I have read over and downloaded Stephan Prodan's implementation of RequireJS server side:
http://www.stefanprodan.eu/2012/09/intro-requirejs-for-asp-net-mvc/
I'm not sure if this is the model that will fit best....Does ANYONE have some good models (examples) of what they have used for using requirejs in a multi-page scenario for ASP.NET MVC?
Or....do you think Stephan's approach is sufficient?
I'm stuck and can't seem to actually make a decision and pull the trigger either way.
Try following the guidance for a generic multi-page application here: https://stackoverflow.com/a/10816983/1225352.
That answer references an example multi-page application from the author of requirejs here: https://github.com/requirejs/example-multipage
Have someone a Url or some example of how to create custom Rules for the metadata section of upshot.js
For example a rule that the element did't already exist in the localDatabase observable array.
Thanks
There is a pretty good discussion on StackOverflow of the Upshot situation and alternatives. The net of it is that Upshot has been abandoned and, fortunately, there are some good choices of libraries out there, including BreezeJS, Ember, and JayData
Scott and Microsoft team says they are going to not continue (by now) with the upshot.js development.
I´m going to stop studying this library.
Tx
Im really new to Grails and I try to understand how it works. I did some tutorials and wrote a sample application with a mysql database connection. Ive got three tables and therefor three domain-classes and three controller using def scaffold = true. So the views are generated automatically. Now I can add and remove and ... the data in my tables. Thats working.
But now I dont know how to go on. I mean, creating those tables and filling them is nice and its nice that this is possible so fast, but... Now I really want develope an application! Normally I work with Spring Framework, Spring Security, Spring MVC and so on to generate web applications. There, everything is logical. I have the requests comming in, the mapping to controllers, classes which work on the requests, answers given back, jsps rendered.... logical!
In Grails, I dont even know where to start for a real application! All tutorials I find show the same: Setting up those tables and being able to fill them, nice, nice - but after that?
Where do I save the "main.gsp". Do I need a controller for it? How does the application at start up redirect to "main.gsp".
Where can I define the "real logic" - I want to develope something like a "questions with multiple answers - try to select the correct answers"-application. Well, I must admit, I really dont know where to start. And I don't see the use of the Controllers and the possibility to add Data to my tables in my application. Thats for admins but not for users.
Could anyone give me an hint how to go on? Or maybe someone knows a good tutorial which is not about "setting up domain classes, controllers with scaffold, adding data to your database" - I dont see so much sense in it.
Thanks for your help! :-)
[EDIT] Thanks for the answers! Services, that was exactly what I was looking for. I guess I simply must get more familiar with it. The tutorials were just confusing me, but now I understand better!
If you are familiar with Spring and Spring MVC, the concepts in grails should be no surprise to you. Grails actually uses Spring MVC under the covers.
Grails can auto-generate Domain classes, controllers and views as you have tried in tutorials. This is to give you a starting point for your application. This is often enough for those textbook tutorials. For real applications though, you may not always have 1 domain class to 1 controller to 1 set of views. You might not always be doing CRUD operations on that domain. For this, you need to dig a bit deeper into Grails. You can do everything you previously have done in Spring MVC in Grails!
Here are some links to help you get going.
If you are trying to understand the 'flow' better. How requests get mapped to controllers/views, check out the UrlMappings.groovy in your config directory. Docs on that are located here: URLMappings
If you are trying to understand controllers better, check out this: Controllers. Keep in mind that your controller do not need to work on domain models. That is simply the default convention. They work similar to a Spring MVC controller.
Models are simple in Grails. Typically the controllers just return a map of the items you want to return. In Spring MVC, you often create a Model object, most times in Grails you will return something like [name: bean1, name2: bean2]. This allows you to easily get those two beans in the vies.
Start with 'Grails In Action'. The first chapter would give you details about the CRUD Sample app creation , but on reading further you would understand the grails flow better. Services are to be used for the logic, Controllers are used for delegation. You dont need explicit xml mapping as is done in Struts, Spring because everything here works on Convention.
Here is info on controllers: Controllers
Also you can use the same manual to find information on other stuff. For example about where to put business logic you should read in The Service Layer chapter.
Read Beginning Groovy, Grails and Griffon by Vishal Layka, Christopher M. Judd, Joseph Faisal Nusairat and Jim Shingler. They are building a real web application throughout the book with models, database access, authentication, css, templates and layouts, and many other things.
We are evaluating Windows Workflow Foundation 4 to use in MVC 3 based Web Applications. We would like to create flexible order workflows for different projects.
Does anybody know good information about the general architecture or hands-on-labs for this kind of application?
Some concrete questions would be:
how can you activate a specific controller/action from the workflow?
what is the best way to communicate between the workflow and the web application (events, wcf services, ...)?
This is a nice article on how to start working with WF4 in your ASP.NET MVC app.
Integrating a persisted WF4.0 workflow with mvc
Another example with video is at below link. (Note: The code attached in the link might not be executable, but it will give some concepts when you study the code and watch the video)
https://channel9.msdn.com/Shows/Workflow-TV/endpointtv-WF4-in-the-Real-World-Microsoft-Support-ASPNET-MVC-Wizard-Framework
This link is showing how we can preserve the data between requests using tempdata. Since it is a large explanation, I am not repeating the same again here.
Sadly, the videos for this seem to be down but the docs seem to try to show you a way!
Sourced from an old post/response from 2009. An alternative is found on CodeProject.com, which is also quoted on this one with a longer list of resources.
I require a star rating control (which allows partial rating like 4.5) for my application built on asp.net mvc.
Any pointers in this direction will be helpful?
Rogie, over at Komodomedia, has spent far too long on this topic writing 3 articles on the topic.
Just in case anyone got lost in the link-soup this is the latest.
It's not MVC specific, but it is cross browser and allows you to get the value back via postback or ajax.
Meanwhile I found this link with example in asp.net.
http://beckelman.net/post/2008/08/30/Survey-Using-jQuery-Star-Rating-Widget.aspx
This is pretty helpful.
Thanks everyone for the help.
I know its not a control, but I found it very easy to implement.
I just implemented this on one of my sites using MVC and it worked beautifully.
http://www.mikesdotnetting.com/Article/114/jQuery-Star-Rating-with-ASP.NET-MVC
This one is my favorite Rating plug-in for JQuery:
http://rateit.codeplex.com/
it comes with good examples:
http://www.radioactivethinking.com/rateit/example/example.htm
There are a couple in the jQuery plug-in list that will be able to do what you require. However there is no specific control for MVC yet.
I tried looking at the links given as response however was not that happy and I developed my own star rating system here and have wrote an article of how I have done it. Hope this will be helpful
http://www.dotnetfunda.com/articles/show/2828/developing-a-star-rating-in-aspnet-mvc
Thanks
I know this is an old post but I like to answer it for everybody who will find this post through search engines.
This article explains how to implement a star rating system for MVC.
I have implemented it and it works like a charm.
http://www.codecapers.com/post/Building-a-Star-Rating-System-with-ASPNET-MVC-and-jQuery.aspx