Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 758049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:26:02+00:00 2026-05-14T15:26:02+00:00

the situation is this. my client (who also is a programmer) asks me to

  • 0

the situation is this.

my client (who also is a programmer) asks me to develop an address book (with mysql database) with a lot of functions. then he can interact with some class methods i provide for him. kinda like an API.

the situation is that the address book application is getting bigger and bigger, and i feel like its way better to use CodeIgniter to code it with MVC.

i wonder if i can use codeigniter, then in some way give him the access to controller methods.

eg. in a controller there are some functions u can call with the web browser.

public function create_contact($information) {..}

public function delete_contact($id) {..}

public function get_contact($id) {..}

however, these are just callable from web browser. how can i let my client have access to these functions like an API?

then in his own application he can use:

$result = $address_book->create_contact($information);
if($result) {
    echo "Success";
}

$contact = $address_book->get_contact($id);

in this way, my controller methods are handling the in and out with the Models. there will be no views, cause i just have to return the data/result from the Models. and he can just use my “API” functions.

is this possible?

cause i just know how to access the controller methods with the webbrowser. and i guess its not an option for him to use header(location) to access them.

all suggestions to make this possible are welcomed! even other approaches to let me use CI to develop. perhaps there already are best practices regarding this kind of cross framework collaboration?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:26:02+00:00Added an answer on May 14, 2026 at 3:26 pm

    MVC seems to have dispersed in its definition. This definition I will offer should be ideal for you.

    Models are where you build your business end of the application. Operations such as create_contact, delete_contact, and get_contact belong in the model layer. The model layer is what builds your application API and should be entirely independent.

    Consider the controllers purely as the user’s puppeteers. Controllers accept user input – the validation, sanitation, and whatnot may be done elsewhere – and invokes the API you’ve already setup in the model layer. Also, controllers then specify what view to use – however complicated or simple your presentation layer is.

    The presentation layer usually isn’t the difficulty. As long as you are only using read operations in the view you should be fine.

    To clarify, if a user wants to create a new contact, the controller may need a method called create_contact that accepts the appropriate input. However, the actual operation of creating the contact must be done in the model layer. This will allow your other developer to reuse that same operation in a completely different application by loading your model, which was already designed as an independent entity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the situation: I have a client who's issued me an XML schema, and
I ran across this situation this afternoon, so I thought I'd ask what you
In this situation I am trying to perform a data import from an XML
This situation arises from someone wanting to create their own pages in their web
The situation is this: You have a Hibernate context with an object graph that
Look at this situation: www.websitea.com displays an img tag with a src attribute of
I frequently encounter this situation in my VB6 applications Private Sub DoSomething On Error
During coding I frequently encounter this situation: I have several objects ( ConcreteType1 ,
I've come upon this situation a few times before. I wish to reference a
I'm wondering how others handle this situation... and how to apply the Don't Repeat

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.