How to use plugins in php mvc framework - editor

I want to know that , i am using my own (modal view controller) framework and want to add some plugins like live chatting ,Facebook/g-mail/twitter (sign up/sign in using these websites).
type of features how can i do this?
I am novice in this field so sorry in advance if my question has some stupidity.
I am using notepad++ editor.
thanks in advance.

Use observer pattern or Event dispatcher pattern for plugins.

Have a look how other frameworks allow you to implement these features.
If one of those features just need js/css and custom html markup to work (like a Facebook like-button for example), you might find some inspiration from Zend Framework's View Helpers.
Search through github/packagist if one of those features has not yet been developed. If you find some library, find a way to use it in your custom code.

Related

neo4j.Asp.Net.Identity Sample Project

I'm new at neo4j and I want to use neo4j.Asp.Net.Identity for authentication and authorization but I can't find any sample that implements that.Anybody knows how can I find a sample for that?
I'm also want to use Token-Base authentication for authentication and authorization.
The project is here: https://github.com/assimoes/Neo4j.AspNet.Identity the problem you'll have is that it doesn't implement the third-party authentication - i.e. you can't just drop it in and it'll work with something like MVC's Facebook/Twitter stuff.
Your best bet is to get the code from GitHub and reference the project directly as you're going to have to implement some new interfaces, and personally - I would change the implementation of the data structure - roles, authentication tokens don't work (if I remember correctly) - so you'd probably need to fix them.
You might actually be better off using my fork: https://github.com/cskardon/Neo4j.AspNet.Identity which I've been playing around with for a while in an MVC5 project and it's working so far (I'll create a demo version of the MVC5 soonish).
There is now a NuGet package for it. Click on the link in the Nuget documentation, and it should take you to the appropriate web-site.

MVC project structuring

I have been looking for an solution for structuring my MVC5 project, but have not found anything yet.
What i look for is. I have an Main Website, which off-course has it's own Views, Scripts and Controllers, but what is special is that i like to have sub Website projects which add an menu point in the main page, but the sub website also contains it's own Views, scripts and Controllers( I have tried to draw a picture of what i'm talking about ).
The point of this is to have an structured in a easy way. But also to reuse the same views in a framework way.
You should be able to define an area in another project, found an article that explains in detail how it is done in MVC3, it should not be very different in later versions since areas and routing haven't changed a lot.
http://nileshhirapra.blogspot.no/2012/02/aspnet-mvc-pluggable-application.html
Update: you do not actually need to set up the project in the Areas folder, but you need to copy all content like views and scripts/css into there before being able to use it in the main application.
If you want these sites to actually be separate websites but only look similar, then that is what you'd need to set up. You'd probably want to decide on a single-sign-on scheme for that.

Menu dropdown messed up after translating page using Google translator

My menu drop-down is now messed up, after I translated the page using on-the-fly Google translater. It refuses to recognize CSS classes I have created and used for exclusion (e.g, I have a class like this class="notranslate", which is no no longer working).
For demostration purpose, I have source code
here
Note: Must register to the site first. Any help would be appreciate it. Thanks
Not sure what is going on but look at this tool: Translate This
This uses the Google Translate but is easier to use.
Hope this can help you.

ASP.NET MVC View/Site Design

This stems from my question that i started at MVC Beginner Question
Im now confident in developing a MVC website from the MVC side of things.
My fatal floor now is the UI level designing. i.e. designing views and master pages including css styling.
Just wanting to get any advice on where i should start? Im currently about to look at the expression studio to see if that will help.
I need to get up and running in this quickly so that it doesnt hold back the development of the website.
Thanks in advance
I would look at a CSS grid-framework like 960 Grid System or Blueprint.
There is often controversy from CSS/Markup purists as to whether the use of such frameworks is valid, but they often overlook that not everyone is a CSS expert. I have found that the use of these frameworks has saved me hours of productivity since my CSS skills (as a programmer) are not that great.
As far as using Expression, I tend to use this as a "test-bed" with simple HTML files. The Designer and CSS Style support seem to be more interactive than that which Visual Studio supports, so for quick mock-ups -- Expression, then move that HTML/CSS over to VS as soon as possible.
One other priceless tool to use while designing is the add-on "Firebug" for Firefox ... it allows you to inspect single elements on your page, the CSS properties affecting that element - it even allows you to change CSS attributes "on-the-fly" to immediately see the ramificatiions. This tool has saved me HOURS!
Consider finding a suitable theme in a free open source template.
Consider something that suits at http://www.freecsstemplates.org/.

How to add a skin engine to asp.net MVC system

I'm implementing a solution in ASP.NET MVC that later can be applied to couple of other fields. To do so it will require to re-brand the UI even though the underlying business logic wont need to change. I'd like to write the code in such a way that will allow other developers to only develop code that will only changes the UI. This is similar to the way that themes can be written against Wordpress Blog software.
Can any one suggest how to organize my project to make such feature work?
http://pietschsoft.com/post/2009/03/ASPNET-MVC-Implement-Theme-Folders-using-a-Custom-ViewEngine.aspx
I would not use bult in Themes (not actually sure if these still exist in MVC) But you could multiple sets of CSS (with related images) in a Themes folder with a separate path per theme eg: Themes\Default, Themes\Classic, etc where the only configuration is the Path element. This would split the styling from the core code and you would'nt need to use any Theme "Engines" etc.
In your MasterPages/Pages/Views you could just set the path to the stylesheets dynamically.
Have you tried using MasterPages?

Resources