Showing posts with label mvc. Show all posts
Showing posts with label mvc. Show all posts

Wednesday, May 30, 2012

What"s the best way to separate PHP Code and HTML?


I really don't like mixing PHP and HTML. Mixing them makes it difficult to maintain both the PHP and the HTML, and it just makes sense to keep the two apart.

Tuesday, May 29, 2012

How to create a simple "Hello World" module in Magento?


How can the following be accomplish in Magento?





  • Display a "Hello World" message using a controller/view/model approach. So, if I went to http://mysite.com/myController it would show the string 'Hello World'. Being able to show this string within the template of my website (for example, the header, footer, etc.) will be a bonus.



Friday, May 18, 2012

ASP.NET MVC controller actions that return JSON or partial html


I am trying to create controller actions which will return either JSON or partial html depending upon a parameter. What is the best way to get the result returned to an MVC page asynchronously?

Sunday, May 13, 2012

how to return an error in an Ajax scenario from ASP.NET MVC action


I am using ASP.NET MVC with jquery. I have the following MVC Action that returns a partial page on Success. On Application Error, I am not sure what to send it for correctly handling it at the client side.

IE9 throws exceptions when loading scripts in iframe. Why?


Precondition:



I have an aspx-page with iframe inside. This iframe points to the url handled by MVC on the same site (it's hybrid site, both standard ASP.NET and ASP.NET MVC). The resulting page rendered by MVC contains a lot of scripts references.

Monday, May 7, 2012

Multiple models vs single model


I have a question about MVC. Particularly about models. Suppose that I have a category table in my database. Now I would like to get results both for a single category for detailed view and multiple categories for a listing. Also I may need to query a number of categories for different purposes.

Friday, May 4, 2012

How do I fetch a single model in Backbone?


I have a Clock model in Backbone:




var Clock = Backbone.Model.extend({});

PHP - MVC framework?


I am just starting out in the PHP world. I have used asp.net mvc and come from a VS 2008 background..

Wednesday, April 25, 2012

Recommended structure for high traffic website


I'm rewriting a big website, that needs very solid architecture, here are my few questions, and pardon me for mixing apples and oranges and probably kiwi too:) I did a lot of research and ended up totally confused.

Monday, April 23, 2012

How would MVC-like code work in Node.js?


I'm starting to get my head around node.js, and I'm trying to figure out how I would do normal MVC stuff. For example, here's a Django view that pulls two sets of records from the database, and sends them to be rendered in a template.

Friday, April 6, 2012

ACL implementation


First question



Please, could you explain me how simpliest ACL could be implemented in MVC.

Wednesday, March 7, 2012

How can you organize the code for a game to fit the MVC pattern?


I'm a freshman in college going for my computer science degree... I've programmed plenty the last several years but just lately I've been getting more into theoretical ideas about organizing code, design patterns, differences in languages, etc.

Sunday, January 29, 2012

MVC 3: Communicating between partial view and view via JavaScript


I have a page that lists users (List.vbhtml), and each user has an 'Edit' link. The edit link makes an Ajax request: