Dear friends,
I am using Wordpress 3.6 for my current development . But my client need a system which has independent
layers i.e 3 layers such as

  • Service Layer
  • DB Layer
  • View Layer

from my analysis I can found that Wordpress has a

**Theme ---- View+DB layer **

and cannot Identify a service layer.

Please advise me with a solution.

Thanks,
Anes

Your client doesn't need a system that has a particular design; your client needs a system that solves some problem of theirs. Your role as a software engineer is to determine the design, which may be layered if you think it's appropriate.

So... if you think you need those three specific layers and WordPress doesn't have all of them, then WordPress isn't an appropriate solution.

Does your client have a system need that requires a service layer, or are they just asking for one directly?

Dear Gusano,
My client need an architecture in which we can take a solution for our own system & for a web service . The Web service is for other web apps.
eg: If we do a plugin in our WP app its service can accessible to other systems through web service .

From my initial analysis I can found that putting a file in WP installation can call the plugin function . But need to tackle the database related connectivity etc....

Advise me

Thanks,
Anes

It's hard to provide specific advice without knowing what the client's true needs actually are, but here's a start:

If we do a plugin in our WP app its service can accessible to other systems through web service.

I can found that putting a file in WP installation can call the plugin function

If you need to provide a Web service, write it using a Web service framework. Wordpress is a blogging/content management platform, not a general-purpose application platform; it's not an appropriate vehicle for a Web service.

If you need to write a Wordpress plugin that uses this service, do just that. Don't try to combine them; that's asking for trouble. Write the service separately, and write the plugin to connect to the service just like any other service client.

need to tackle the database related connectivity etc

That's certainly true of the service... do you have specific questions about data access?

Dear Gusano,
Don't consider Web Service as a main concern , I plan to use the simple
REST API method described in URL Click Here & the plugin WPBI (Wordpress Business Intelligence) allow to communicate with an external plugin call .

So I feel there is no need for a framework for Web service .

please let me know your idea.

Thanks,
Anes

I plan to use the simple REST API method described in URL Click Here & the plugin WPBI (Wordpress Business Intelligence) allow to communicate with an external plugin call .

Okay, so you have RESTful calls into a PHP application. Depending on your code, it may or may not be easily identifiable as one, but wherever you have Web methods, that's your service layer.

I'm not really sure what you're asking for... are you unsure how to connect these RESTful methods to the WPBI plugin?

Dear gusano,
Service layer is plugin internal functionality itself .
Currently I checked the case of only 1 plugin connection
with outside world , it's successful and the author of plugin offer more option in pro & ent version of that plugin . Gusano, my next unsurity is in how to implement OAuth2.0 in this setup.

Please advise

Thanks,
Anes

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.