Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About mysteriousmonkey29

  • Rank
  1. Ok, that makes sense. So basically, ingolme is suggesting that I write it purely in php at first (using form submission or something similar), then once I get that to work, modify the controller to use javascript/jquery/ajax?
  2. Hey, sorry for the extremely late reply. I have some free time again, so am resuming work on this project. I was rereading this post, and noticed that I never replied to your last comment. What do you mean, exactly? I guess by "an approach that works without Javascript", you mean that I should write the controller in php, and then call it from the view using get and post, or something along those lines. But I am confused by what you mean when you say to add a layer of javascript on top. If it works without javascript, how would I integrate javascript into it "for convenience"?
  3. Thanks, although it appears that PhpStorm and other jetbrains IDEs like IntelliJ require subscription fees, and that their community versions have very little language support. So I think they're out (which is too bad because I've heard good things).
  4. Ok, thanks for the info. That's a very interesting point about front-end debugging. I guess I'll look more into built in browser debuggers/tools, and then let that inform my decision of which IDE to use. Thanks!
  5. Hello, I am looking for a new IDE. I am currently using netbeans to develop a website in php/mysql. I like a lot of things about netbeans, but I don't like that it doesn't come with built in compilers/debuggers. You have to manually go and add/link them on a language-by-language basis. This isn't too bad in theory, but sometimes it doesn't work like it should, which can cause a huge headache. I had a of a time getting a debugger to work for php. I am now adding javascript/jquery to the website, and discovered that the debugger I already set up doesn't work with them (only php). I don't w
  6. For the reference of anyone reading this thread in the future, I think I figured out my general design for MVC. The model is a set of PHP/MySQL functions for creating/modifying a list of comic strip objects, each containing their own list of comic objects, as described earlier. The view is a PHP class with an output functions that loads a PHP/HTML template using require '…' as explained by foxy mod. The controller is a JavaScript/Jquery file that listens to button clicks and other user interactions, and then replaces the whole content of the website (which I surrounded with a div id="content"
  7. Actually, I solved it by replacing the regular JavaScript Ajax with jQuery Ajax load call. I added a div tag with the ID of "content" surrounding all the content, and replaced the script tags with: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function() { $("button").click(function() { $("#content").load("index.php?action=changeText"); }); }); </script> Works like a charm
  8. Hello, I am trying to create a proof of concept webpage that changes text in response to a button press using an MVC pattern (or at least as I understand it), and Ajax to avoid reloading the page. (I would like to implement Ajax in a larger MVC program I am working on but thought I would try to get it to work small-scale first). From playing around with examples here and here: https://www.sitepoint.com/the-mvc-pattern-and-php-1/ http://www.w3schools.com/php/php_ajax_php.asp I have the program working with each component individually (it works with the MVC pattern if I don't mind relo
  9. Okay, thanks for the info. I'll probably pursue the method Suggested by foxy mod, just because I don't think I'm trying to do anything that complicated. So when you include the PHP/HTML template, is it just like pasting in the code? So it can access the variables from the file is being included in
  10. Okay, I have yet another follow-up question (sorry to keep pestering you guys). I started looking into HTML templating, and realized I am not exactly sure what you guys mean by HTML templates, like in your comment here: Are you referring to HTML 5 template tags? Or do you mean I should create, for example, one HTML file titled comics_page_template.html, containing my generalized control panels and a placeholder tag for the comics list, then another HTML file titled comic_template.html, containing an individual control panel and a placeholder tag for the comic image, then load the pare
  11. Also, after thinking about it a little longer, I'm still a little confused about this point: It makes sense that a regular PHP process that just generates HTML gets destroyed after being used. However, most (if not all) explanations of MVC that I have found thus far hold that the model contains permanent data storage. I guessed before that I would write the model in PHP simply because it is the most ubiquitous language in my project, but now I'm not sure if this is the correct choice. Would writing the model in PHP nullify its ability to permanently store data? If so, what should I wr
  12. Hmmm, I've read a lot of posts that contradict that. Upon further googling, the main problem seems to be that no one can agree on how MVC works. Here are a few similar but markedly different flowcharts that I found on Google images: https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/MVC-Process.svg/2000px-MVC-Process.svg.png https://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/ModelViewControllerDiagram2.svg/350px-ModelViewControllerDiagram2.svg.png http://www.moock.org/lectures/mvc/images/mvc-02.jpg http://help.sap.com/static/saphelp_hanaplatform/en/91/f233476f4d1014b6dd926
  13. Okay, I have formulated a few more questions, this time specifically implementing an MVC pattern. First, in my case, would it be the controller that reads data from the database using PHP/MySQL, or with the controller tell the model to read data from the database upon being called into action by buttons on the view? Second, does the controller tell the view to refresh? I have read that a common misconception about the MVC pattern is that the controller passes data directly to the view, so I am pretty sure that the view is supposed to be getting data from the model. However, I am not sure what
  14. Okay, that was very helpful, thank you. I think I mostly get what you are saying about the recursive population/stuffing ttemplates inside each other, and the explanation about PHP memory definitely makes sense. I think I will proceed with this design and see if I run into any more unexpected issues.
  • Create New...