Modules in MVC project [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I understand how MVC works with models, repositories and services in PHP.
Could anyone explain to me what is the role of Modules and are they related to MVC in any way?
I would even appreciate any links relating to this topic. Cannot find anything interesting myself

Module definition:
each of a set of standardized parts or independent units that can be
used to construct a more complex structure, such as an item of
furniture or a building.
A module is typically a portion of code that provides a specific functionality in a project or framework.
You could think of a plugin in Wordpress as a module.
MVC itself stands for
M - Model
V - View
C - Controller
As far as I am concerned modules don't really have anything to do with the MVC structure/design pattern... although they are a good way of creating self-contained bits of functionality that can be used across projects, just like plugins and Wordpress.

Related

Zend Framework - New module or just a controller [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm new in Zend Framework. I know this may seem like a stupid question, but i would like to clarify. Creating an application along with a website with ZF, when it's best to create a new module, or just a controller inside a module? Thanks in advance!
You should create a new module or not is totally based on your requirement.There are few common examples explained below:
1) Generally CMS websites having front end and administrator area, so for that we would prefer to create two modules. Default module for the front end (used by end user) and admin module used by site administrator only.
2) Another example: if we would like to create a Job Portal website then there will be three type of users be available on the site. Job seeker, Employer and Administrator. So we would prefer to create three modules applicant, employer and admin
Hence when to create a module is depend upon requirement of your application. Also when we require segregation between the features provided to different users, there we generally use modules.
Also refer: When to use Modules in Zend Framework?

Does anyone have a well written php unit test? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
So I am new to unit testing. I'm through a book and couple of tutorials but I still have some doubts about the exact proper implementation.
I am searching for a well written unit test, because the sample examples that are based on the relationship of 2 or 3 classes cannot answer my remaining questions. I'd like to see some real world scenarios of proper coding that ensure long-term maintainability. The bigger the project the better. Does somebody have a well written test, or does somebody know a well written test that's available somewhere on the web? Thanks for help!
You may use Github to browse sources of various popular open source projects like Joomla.
Here is the link to Joomla CMS https://github.com/joomla/joomla-cms and here is the link to Joomla Framework https://github.com/joomla/joomla-framework.
Mentioned Joomla because it is my favorite; especially Joomla Framework. You may also try others like CakePHP, Code Igniter etc.
Just browse through most of well known open source projects on Github.
Doctrine
Zend
PHPExcel
To name but a few.

How to integrate a Photoshop design in WordPress? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I've first to design a layout and then to develop this design in WordPress website. I've read some posts on this but can't make myself clear, hence asking here:
To design the layout, can I do like any other normal website or is there any WordPress specific design structure which will need to follow?
Once I finish designing the layout, what would I do?
a. I'll write my own HTML/CSS for created design as I do in case of other normal website? If yes, what would I do next after this?
or
b. I'll have to get a theme downloaded from net which is developed for WordPress, and then (after installing) I'll edit its HTML/CSS pages to convert it into my design (This is what I think right now). If yes, wouldn't be the downloaded theme have code and design elements which would not require for my created design. Also what if my design has something which is not there into theme?
I'm confused how should I proceed with design to development in order to make my work go in right direction. Please excuse me if my questions are really basic, I've not yet worked on any WordPress, Joomla or Magento things.
You should be able to do in wordpress whatever you can do with a standard website.
The only difference is that you'll have to stick to some standard HTML structure.
Start by reading the templating documentation
Then you can download a minimal theme to get a base to start from.

PHP site - as service - how to separate it as modules or addins with easy integration [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
i am creating a php website as a service. My customers pay me annual fee and they will use this service during this time.
My question: I want to provide several features. And some customers needs only certain features. Some needs custom made features. So how to separate it as modules or addins when coding, keeping it simple for integration to the site.
Please guide me.
Example site: Shiftcode.com
Check their gpt sites admin panel.
thanku
You can have a look at http://www.symfony-project.org/, a very good framework for PHP development. It has a nice routing feature that can fit your needs. And you will gain unit test framework and a lot of other things.
before decide about developing such complex application, have a look at existing ones like WordPress Multisite/Network

Things to consider when creating a web framework [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am not trying to create yet another web framework.
For one of the applications I am working on, I want to create a custom framework. I don't want to use any already available framework.
What are the common things to consider?
What should be the architecture?
Thanks :)
If the point of a framework is to make tedious things easy, a good start would be to consider what is tedious.
What are the common things to consider?
Purpose. Usually, when you start building a piece of software, you have a purpose in mind. What will it do that other programs can't?
If you can't answer that question, then take any existing open source framework, change its name and your job is done. Now you have your own framework.
Well if you are going to write a custom framework then I assume the framework needs to be tailored to your needs, otherwise you would use one that is already available. So figure out what your needs are and go from there ;)
What are the most often repeated operations in your application? Is there a division of labor that a framework could make more apparent?

Categories