• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DMZ Help

Hi Lads,
Doing a bit of reading up and found a lot of recommendations for DMZ, it's a bit late on a Friday night, the beer isn't helping. Just wondering if someone could direct me to the right place or just explain to me in laymans terms what it's all about??

Here's the manual: http://www.overzealous.com/dmz/

It explains it pretty well. I do have to say that when I first tried it (after it was recommended several times to me) that I quit, it was too hard for me to understand. But then I looked at it a few days later. I'll never use anything else. It basically simplifies and speeds up the database development. I looked through the example app and it helped me understand a lot of it.

So, you'll have a model that corresponds to a database table. You can then create an object with that class. DMZ has default functions that are already in place for the model.

For example, if I were making a blog, my posts model might have methods like the following:

and a bunch of others. With DMZ, I make the model in about 30 seconds (fine tune stuff later) and just use built in functions like get() and save();

It just has everything in place that you would do yourself anyway.

Hope that helps, just try it out.

So the model is basically crud stuff?? What's the deal with objects and classes?? Sorry if this is simple stuff, don't bother answering if ya like just trying to get my head around it before I dive right in.


tomdelonge's post was quite explanatory, he provided a well-written explanation and the DMZ link for more info. I'll take a stab at it for you.

You:"So the model is basically crud stuff?"

Answer: It could be, depends. But to really answer that, we need to go to your next question.

You: "What’s the deal with objects and classes??"

Answer: The deal with objects and classes is that your database items - via the DMZ-enhanced models - appear as objects which, to object-oriented programmers, leads to a much more comfortable, intelligible style of coding.

Furthermore, DMZ also allows you to include relationships within your models that mirror your table relationships. By including said relationships, you are relieved of the need to do things like save an invoice then the actual invoice line items in separate tables. Because you've setup the relationships ahead of time in the models, DMZ saves and retrieves affiliated table results as needed.

DMZ has much more functionality than I mention and really the best you can do for yourself is to install it and try it. If it works and you get it, great. If not, Codeigniter's ActiveRecord continues to work well.

Hope this helps some and apologize if there are any inaccuracies. I'm not a Codeigniter pro by any means having come across from Java and older languages to PHP/CI.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.