I have a PHP site based on a simple MVC principle. I currently have one model file with many functions for getting data from the database. However, it's becoming a little monolithic now so I'd like to split it into separate models. The question is - what's the best way to do this?
Is it a good idea to create a class for each table, so I...
I'm going to start a project using a Zend Framework MVC implementation.
How do I work with ajax? I mean, should I place all ajax code into controller? Or into view?
For example, I want to get posts from author 'ivan' to show on a page.
Normally, I create a link to '/posts/author/ivan' or smth like it, create a new Action like 'byAutho...
Help me with this algorithm please.
var companies = companyrepository.GetAll().OrderBy(sidx + " " + sord).Skip(pageIndex * pageSize).Take(pageSize);
string where = "";
if (op == "eq")
where = field + "=" + data;
else if (op == "cn")
where = field + " LIKE '%"+data+"%'"; ///here lies my problem
companies = companies.Where(where);
...
This is my first foray into "appropriately" using an MVC construct (with Code Igniter). I'm hoping some guru can wave her hands and tell me where the following code elements belong. I have them written, I just want to plunk them in the "right" spot!
Call a DB and see if we have a user signed up
Route to a signup page
Route to the main ...
I'm finding it difficult to embrace a Java MVC framework, when it looks as if Servlets, JSPs and a lightweight DAO will do just about everything you need it to do in order to decouple the controllers/views/models. For PHP I can see the necessity since there are no built in constructs like servlets, but do Java MVC frameworks really give ...
Are the client side javascript extensions, e.g. MicrosoftAjax.js, the same in both ASP.NET AJAX (for ASP.NET WebForms) and ASP.NET MVC?
For example, does it still include:
Global Namespace
Sys Namespace
Sys.Net Namespace
Sys.Serialization Namespace
Sys.Services Namespace
Sys.UI Namespace
Sys.WebForms Namespace
although I'd suspect t...
Hi
Has anyone built an application using asp.net mvc with data annotation for validation and subsonic 3.0 for BOL generation?
I am using IDataErrorInfo in partial class at the moment and would like to move to data annotation but i'm not sure how to do it with subsonic 3.0 has my object generator.
I'm using MVC 1.0
I would like to fi...
I'm working with an unchangeable legacy database schema where each instance of an object has its own table in the database with associated records. I need to change a model's useTable every time the model is instantiated, but retain Cake's nice caching and what not.
Say I have many pad objects, which each have several note objects (Not...
Hi everyone !
I've got a few questions about the architecture of a software that I'm working on !
So basically, this software allow the user to access to some popular sites :
Social networks (Facebook, MySpace, ...),
Common services (RSS, Mails, Twitter...),
Social bookmarkings (Digg, Delicious...),
Chats (MSN, AOL...),
...
Cur...
I am doing something wrong and I can not figure out where...
I have this in my view - CreateForm.aspx
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<%= this.Ajax.ActionLink("Create New", "CreateForm", new { nr=ViewData["Nr"]??0 }, new AjaxOptions { UpdateTargetId = "panel" + (String.IsNullOrEmpty((stri...
I keep seeing CakePHP and CodeIgniter referred to as full stack MVC frameworks, whereas Zend Framework is said to be non-full stack. What exactly does this mean?
...
Hello guys,
I have an application using MVC. In my controller I have their a viewdata[] which contains the image path (Viewdata["dd"]=new Control().ResolveUrl(path)). This will work on my local but on the deploy it will not work anymore.
Anybody have experience this scenario?
Your reply is greatly appreciated.
Best
...
Hi Guys
I have a issue that they users here want urls like http://host/Post/PostTitle
Is this possible?
As your not passing in the action?
regards
...
I have 2 controllers, task and user.
I need to create a view for "create task to users". So I need "a user list" and "create task" view together.
Usually views inherit from only 1 class.
How can I create a view working with 2 classes?
Have any idea?
...
Hi , i need to auto refresh a partialView in the page every second (or a set interval of time)
i thought of the following method is this rite
loop
{
setInterval(function() { <%Html.RenderPartial("partialview", Model);%> } ,1000 );
}
or is there a better way using ajax stuff ?
...
I have a controller that is working in my site but failing during unit testing. It is pretty simple and depends on Linq to Sql to return a collection of JSON objects.
The Test fails because the DataContext can't find the connection string when called from outside the MVC project.
I had a look in the auto generated code:
public DC():
...
Say you have a customer object and the "customer file" form that manipulates that object. Is the following a correct interpretation of MVC?
Customer - Model
CustomerForm.cs - Controller
CustomerForm.desinger.cs - View
Even though CustomerForm.cs and CustomerForm.designer.cs are partials of the same class, it seems to makes sense from ...
I am developing a http module that hooks into the FormsAuthentication Module through the Authenticate event.
While debugging i noticed that the module (and all other modules registered) gets hit every single time the client requests a resource (also when it requests images, stylesheets, javascript files (etc.)).
This happens both when r...
If I want to use subdomains for images, stylesheets and javascripts on my website (like img.domain.com), how would you set it up in Visual Studio 2008 so I am able to debug the website on my local computer?
Is it possible ? and how ?
The webdev server always uses localhost:port, is there anyway to map etc. img.localhost:port to a speci...
I have a extension method. Can any one help me how to test this method with Moq?
public static string GetBaseUrl(this UrlHelper urlHelper)
{
Uri contextUri = new Uri(urlHelper.RequestContext.HttpContext.Request.Url, urlHelper.RequestContext.HttpContext.Request.RawUrl);
UriBuilder realmUri = new UriBuilder(contextUri...