Hello I'm building my own PHP MVC framework. Not with the intention of using it. But I'm trying to learn PHP5 OO and the MVC design pattern.
I've read a lot of tutorials and got the basics working but now I'm stuck since things are getting more complicated.
My framework uses the following URL structure: /controller/action. Optionally f...
Hi guys,
I know this is wierd, but I am using ASP.NET MVC, I have real simple jQuery on 2 views. One view is the Home page and the other is an item details page. This page is opened using an Action Link on Home Page. The jquery on item details page does not fire at all.
$(function() {
alert('Fired!');
$('#contact').hover...
My mvc page returns json by using the function Json(mycustomclass) to return a JsonResult object.
This works just fine except, I need to wrap the json in a callback so that jQuery can use it.
I want it like this:
jsonp1246168411282({"myjson":"some values"})
but I am getting this:
{"myjson":"some values"}
Is there any way I can 'wrap'...
I am in the early stages of creating a small-medium sized web application by myself. I read "PHP Objects, Patterns, and Practice," and I decided to use page controllers because quick production is a high priority. Page controllers were also appealing because I am unfamiliar with PHP frameworks and creating an elaborate front controller ...
I have an index view that lists items, and it's a long list so I use Paginator to limit items to 50-to-a-view.
Each item has an "edit" link that goes to an edit view with inputs/validations/etc. When that form is submitted, I redirect the use back to the index view.
So far so good, but here's the rub:
If a user is on page N of the in...
Hi,
I have a page that has fields dynamically loaded via JQuery. It allows a user to add additional fields and data on the fly.
Currently that data is collected via JQuery and sent via an Ajax request to be dealt with.
But is there anyway of doing this in a normal action post? Currently it seems that the dynamically inserted fields are ...
In the Zend Framework Quickstart, there has been a change from models that extend Zend_Db_Table_Abstract to the Table Data Gateway pattern.
Personally, I have not had much experience with this pattern and I keep hearing this should most likely be used instead of the old way.
A short example from the quickstart:
Old way:
class Default...
The following is taken from page 56 of Professional ASP.NET MVC 1.0.
When we look at the Details.aspx template more closely, we’ll find that it contains static HTML as well as embedded rendering code. <% %> code nuggets execute code when the view template renders, and <%= %> code nuggets execute the code contained within them and the...
I'm passing data between my controller and my view using a ViewModel class. When there are validation errors, I return the ViewModel back to the view so the user can see the errors.
I'm having trouble figuring out the best way to deal with the data that is only passed from the controller to the view, which isn't passed back to the contr...
I'm building a forum in PHP and MySQL (for the funs). And I'm looking for a more elegant, cleaner, nicer, smarter way of strcturing it. I usually do it like this:
page.php
<?php include 'header.php' ?>
<?php code for this specific page ?>
content <?php loops and shit all over ?>
<?php include 'footer.php' ?>
In the header file I h...
How can dynamic breadcrumbs be achieved with ASP.net MVC?
If you are curious about what breadcrumbs are:
What are breadcrumbs? Well, if you have ever browsed an online store or read posts in a forum, you have likely encountered breadcrumbs. They provide an easy way to see where you are on a site. Sites like Craigslist use breadcrumb...
I'm currently implementing my DAL using DAO's.
I would like to do pagination at the database level, so in my DAO's I currently have methods like
getEvents($page, $limit)
and
getEventCount()
Then in my service layer I'm returning an array
array($events, $eventCount)
and setting up the pagination in my controller (using Zend_P...
Does Spring 2.5 (or 3.0) include support for dynamically populating a select list based on what the user selects from another form element?
For example if you have a form with 2 select for (Car) Make and Model. When the user selects a Make from the first list, the Model select should get populated with the available Models for that Make...
On a new ASP.NET MVC application we are following a TDD approach, using NUnit for unit testing and Unity for Dependancy Injection.
Our views are being made as "dumb" as possible by adjusting our models to supply data in the most appropriate fashion for our views.
Is there a merit in unit testing our views? If so - how?
...
We are looking to host a Java Domain Model (written using DDD) inside a web application. Ideally I would like to support RESTful resources and requests, having a single site to support both users and a REST api.
Ideally the same url could be used for both end users and the RESTful API of a given feature (with HTTP content types / negoti...
If I have an action where the result is a redirectAction to another action in a different class, is it possible to get validation errors to display in the resulting action? E.g. in the following example, if a user executes actionA (which has no views associated with it), and there are errors, is there any way to display those errors in t...
Will you put the model part in asp.net mvc into a different library/assembly?
Edit
Or should we put put the model part in asp.net mvc into a different library/assembly?
...
I've just released a PHP framework called EuropaPHP (http://europaphp.org/). I was wondering if I could get some feedback from of you guys whatever it may be. Let me know what you like about it, what you don't like about it; whatever.
It's based on similar coding conventions to that of the Zend Framework and as a result, the Zend Framew...
Hi,
Is there a standard way / C# library to convert a string into a user friendly uri in order to use it in a RESTful MVC environment?
StackOverflow does this, for example "èòà" are converted to "eoa", question marks are removed while dots, commas and brackets are replaced with "-" and so on.
Any suggestion? Thanks
...