Routes and regex in Kohana 3.0
Hi! New to Kohana... I was wondering if it's possible to use regex for setting up a route that handles all requests except for one, 'main_page' for example? Thanks for your time ...
Hi! New to Kohana... I was wondering if it's possible to use regex for setting up a route that handles all requests except for one, 'main_page' for example? Thanks for your time ...
I have been a PHP developer for about 10 years now and until about a month ago I have never used a framework. The framework I am now using due to an existing codebase is cakePHP 1.2 I can see certain benefits of the frameworks with the basic helpers like default layouts. I can deffinately seen the benefits of MVC keeping the logic sper...
Hi, I've been looking into view models for mvc and I'm looking for the best way to do them. I've read loads of different articles but none seem to be clear as the "best way." So far example I might have a Customer model with the following properties: First Name Last Name Title Location Where location is a foreign key to a location t...
I'm just trying to understand the Templating(system). If you use MVC in your web application then you don't need to use something like Smarty(template engine) as you are already separating application code from presentation code anyway by using MVC right? please correct me? So am i correct in thinking it's MVC OR Templating or do you us...
I have a get/post/JSON function on an aspx page. This page adds data entered in a textbox to a table populated by javascript. When the user select the submit button. If the textbox is not empty, have a popup button telling the user the data in the textbox is not saved in the table. How do I have a confirm "ok/cancel" popup display on ...
Hello, In my app I am using the ym4r-gm plugin, which allows you to play with the Google Maps API... I put the map "setup" in the controller: @map = GMap.new("div_map") @map.control_init(:large_map => true, :map_type => true) @map.center_zoom_init([47.0, 26.0], 7) ... And only render @map in the view. So my first question is whether ...
Hi guys... I'm begginer in asp.net mvc, and i have a doubs: I'm trying to do a label for a TextBox in my View and I'd like to know, how can I take a Id that will be render in client to generete scripts... for example: <label for="<%=x.Name.?ClientId?%>"> Name: </label> <%=Html.TextBoxFor(x=>x.Name) %> What need I put in "?ClientId?"...
I am trying to navigate to an MVC action by POSTing rather than GETting. (The action is a DELETE, and I don't want it reachable by an external link.) I am using a link in a grid generated by Ajax.ActionLink("Remove", "Delete", new { saID = Model.Said, id = e.id }, new AjaxOptions { HttpMethod = "POST", Confirm = "Are you sure you want...
I have two tables Boxer and Prospect. Boxers has general stuff like name and and dob etc and a BoxerId While Prospect contains only one value (at the moment) which is a boxerId. If a boxer is a prospect(up and coming boxer) there Id will be in the prospect table. This works fine but now I want to select all boxers that are prospects ...
I'm practicing MVC style programming. I have a Mastermind game in a single file, working with no problems (maybe apart of the fact that "Check" button is invisible at start). http://paste.pocoo.org/show/226726/ But when I've rewritten it to model, view, controller files - when I click on empty Pin (that should be updated, and repainted...
Hello everybody, I have looked some videos and read some articles about MVC, MVP, MVVM. I think, that I understood basic principles and differences. But it seems to me that samples in articles and videos are very easy. I think that it's easy to learn how to apply these patterns when you can look on some projects. So I'd like to look ...
Hi, I'm currently testing the controller in my mvc app and I'm creating a fake repository for testing. However I seem to be writing more code and spending more time for the fakes than I do on the actual repositories. Is this right? The code I have is as follows: Controller public partial class SomeController : Controller { IRepos...
I am using C# ASP .NET MVC and ajax calls. I am able to get the display of the table along with all features. But, I don't understand how do I add a checkbox and button. I have tried dom-checkbox as well but can't get it to work. Any help is appreciated. My code looks like this: $(document).ready(function () { $('#personTable').data...
Hi all, This question is a bit rhetorical. At some point i got a feeling that ASP.NET MVC is not that authentic implementation of MVC pattern. Or i didn't understood it. Consider following domain: electric bulb, switch and motion detector. They are connected together and when you enter the room motion detector switches on the bulb. If ...
I have a requirement, in an MVC2 web application, to validate that the user is at least 13 years old. Is there a date/datetime validation attribute that will enable me to do this? ...
Hello. I’m starting to think about and develop an architecture for a big web application, and I wanted to get suggestions and/or recommendations on which technologies and/or frameworks to use. The application will be an Intranet-based web site using Windows authentication, running on IIS and using ASP.NET. It’ll need to be structured ...
I'm in the process of building an MVC web application using the Zend framework and I've encountered an odd problem. If I have the httpd.conf VirtualHost section and the web site's root .htaccess file configured one way, Apache does not read the index.php file (i.e. www[dot]mywebsite[dot]com/ fails), writes nothing to the rewrite log and...
The first layer is routing and the second layer the controller, so when in View, is there a way to dump out the path or filenames and line numbers of route and controller before reaching view? I wanted to do this because www.example.com/stories/12345 is showing a page, but stories_controller.rb doesn't have a def index or def show Upda...
I am creating an MVC application framework, using only libararies and components that I create myself (mainly a learning experience), but I'm not quite sure how to separate each kind of library from one another. We'll call my application Cat. Lets say I'm creating a library called Dog, which would sort of be like Zend and is full of di...
I have got simple module in my asp mvc page where can I generate some static html content from database. For example <% RenderAction("Article", "Article", new { articleId = 1 });%> returns (PartialViewResult) <ul> <li><a href="someurl">Hello worlds</a></li> </ul> I would like to have possibility to use Url or even Html object...