Best Practice for: Codeigniter Website AND Mobile App |
[eluser]Unknown[/eluser]
Hi, i habe a website (http://www.unser-dinner.de, build on Codeigniter. Now i am developing native mobile apps with Appcelerator (http://www.appcelerator.com/) For my mobile app, i need many of the functionality of my Website, but many things are different (in the mobile app eg. i dont need any views,config setting for CSRF set to false etc) But i need to call some models. Here my question: How can i configure Codeigniter to differentiate the two types of request incoming: 1) Normal website 2) Calls from within the Mobile App I tried setting up two applications sharing the same codeigniter application. I want to route the request from the mobile app to the "app" application, and the request from the website to the "web" application. See folders: applications/ web/ app/ Any idea ?
[eluser]tomcode[/eluser]
Me, too, I like to split a site up into special applications. For each application I use a separate entry php file. For the main site I use index.php with .htaccess for nice URL's, any the other application (JSON server, etc) use an corresponding entry file corresponding (json.php) . This keeps addressing the apps simple. Does that help You ?
[eluser]PhilTem[/eluser]
You can simply make the same app and use the same application folder but depending on Code: $this->agent->is_browser() && ! $this->agent->is_mobile() // or vice versa you create more or less content, load specific views, etc. pp. There's no need to develop a separate app for that ![]()
[eluser]PhilTem[/eluser]
[quote author="solid9" date="1354347684"]I think he needs bootstrap or foundation3[/quote] That's the solution if you only want to have the layout responsive and use CSS techniques to hide/show content. If, however, he wants to grab different content from the database or handle things differently for mobile devices (e.g. not allowing access to some controller) then he's gotta do it within the controller using above stated code ![]()
[eluser]alandavid[/eluser]
Hello, Hello i am web developer so mobile application is different . but i have some idea for you first u focus on ur data base in every application data base has most important |
Welcome Guest, Not a member yet? Register Sign In |