Jump to content

webservices?


Liquid Fire

Recommended Posts

What is your guys opinion on the use of web services vs normal PHP Code for data interaction?  I mean if you had a choice would you use services of not?  I think they are good for giving information to a 3rd party but for internal use i don't see the point since there is more overhead and you are not add to use that data inside something like a model file without creating a wrapper for it.

 

That brings me to the main question which is there an framework that provides a way to easily use web service as a model file?  I mean it is easily to use a database as a model file since CRUD function for SQL are standard and can be built into a function but CRUD function are not realy standard with web services(i mean for SQL INSERT INTO ... it to insert data but for a service that might be a function called save or save_item or insert or whatever.).

Link to comment
Share on other sites

I like webservices a lot. I think they open up a lot of doors and eliminate a lot of communication barriers between systems. I also think its a very good way to expose an API.

 

If you know that the users of your framework are always going to be using the same box... don't bother, but wouldn't it be cool to have a single installation of your framework that you manage... then you can expose various methods to different servers, which effectively allows them to take advantage of your framework w/o having to have the files physically reside on their box.

 

From a maintenance standpoint, this eliminates a lot of headaches for you, no versioning to deal with, etc. Basically you maintain things in one place and updates are pushed out to all.

Link to comment
Share on other sites

I was really only taking about the model of the MVC, there is zero reason I would every use web service as the entire framework, it basically kills a lot o fthe point of OOP like data encapsulation since i can't hide any of the data i pass back or having to do:

$data = $service->get_user_data():
//edit user
$data = $service->save_user($data);

instead of

$data = new user():
//edit user
$data->save();

I think web services are a good way to expose data but i would not do it for, like my framework database class.  I think there is a reason why the main framework don't use pure web services(i don't know of any the do that).

Link to comment
Share on other sites

I really have no idea what you're talking about. Have you ever used webservices? You have complete control over what data gets passed, what methods are exposed etc. Furthermore, whether or you not you choose to use OOP is a separate matter from the webservice all together.

 

Now that being said, I don't necessarily know that your framework would be a good play for what I suggested. It really depends on the functionality that is there and how you have it set up. But being able to centralize an application and only have to maintain a single installation is absolutely a good idea.

Link to comment
Share on other sites

and I agree that a single point of maintains for an application is good but a framework, at least to me, is some to build an application as the base code and that to me is not something that should not be ever servered through web service.  I think of web service as a very good this for data pass and functions to modify data but having something like a url_helper functions through web service just does not make sense.  Also what I would not be happy to have my entire website rely on something i don't have control over becuase what if they decide to stop offering the framework?

Link to comment
Share on other sites

Valid points as the user of a framework... exactly the situation you want as the provider ;)

 

If your customers depend on you that means they'll keep coming back.

 

Best situation for the clients. Probably not.

 

Good business? Absolutely.

Link to comment
Share on other sites

Good business? Absolutely.

 

I would have to disagree because thinking like a customer I would never at work suggest use something that if it breaks, our entire site would go down, like a framework on services would.  something that is not a good situation for a client mean that they will most likely try to find a better solution(and with framework there are many better solutions)

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.