Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

I wanted to see if I would be able to create a very basic PHP MVC Framework from scratch. So I did it. Its not got very many of the features you'd expect from a web framework, it literally looks for the controller, runs the appropriate controller function, renders the view etc. It just gives a very very basic Model-View-Controller Setup.

I'm looking for criticisms. This was done relatively quickly and does not include any http features, user input features, bunch of functions that can make programming life easier.

It was made simply to provide an extremely basic model-view-controller setup. So please don't say I'm missing features, I'm more than aware of that.

It's also not foolproof. If for example you pass "Home/Page/view" to the controllers loadView() function or a similar multi-directory structure to the loadModel() function it will break. I'm looking into a solution for it, but as this is only intended as a challenge for myself and possibly personal use then its not a major concern for the time being.

That was how it was looking around a month ago.

Recently, today in fact,I've been working on it more and I'm quite proud of where I'm at now with it. I've managed to turn it into an SPA Framework as such.

Check it out here.

https://github.com/Coly010/ChaoticFrame

It's fairly simple to understand and use.

Anchors get prevented by jQuery, which then uses a Get Request to the appropriate Controller using the value of the href attribute. It then loads the new page into the Content Div.

I know this probably seems like mediocre stuff to most of you, but to me, being able to have a .html file as the front page of the site, using jQuery to send requests to the backend is a major step in my learning curve.

As it stands at the moment it can be used for practically any site I believe.

The next step is incorporate nodejs into it and turn the next version into a framework for games.

On git, I've created a version tag for this version so that I and others can easily switch between which they would like to use. (At least I think that's how it works, still getting used to Git also.)

If you want to use it for anything feel free, but send me a message with a link to the final product. I'm curious to see what people could make with it.

Edited by Coly010

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...