I am looking for some advice from somebody who has used Google maps and Codeigniter. I am new to maps and working on a project that is built with Codeigniter and uses Google Maps. I am wondering whether to incorporate it directly into the project or use a library for it.
I have found a library here - http://biostall.com/codeigniter-google-maps-v3-api-library and have started using it and have found it easy to use for incorporating maps. I am wondering however if anyone else has used it and if so does it have the full functionality of Google Maps.
I know that Google Maps has amazing features and I am a bit anxious to continue with the library and discover later in my project that it doesn't support the functionality I might need. I am going to keep researching it but if anyone has experience with it I would appreciate some advice.
Yes, I've used two different Google Maps libraries for CodeIgniter 2.
I ended up keeping the one you've linked for both projects. It was cleaner to use than the other, less helpers to load and lines to write in order to create a simple map. I don't know what else you're really looking for here. Also, with this library, I only needed to pass two variables into the View... where with the other, the View needed a bit more complex code. Really, there's only two variables that need to be passed into the view... the Map and the JavaScript for the map. If you're clever, you could also combine them into one.
Quote OP:
"I know that Google Maps has amazing features and I am a bit anxious to continue with the library and discover later in my project that it doesn't support the functionality I might need."
So what? If that's your only concern, then don't worry. Switching out something like this is pretty easy. Since it's invoked and configured in your Controller (or it should be), there's relatively little code to change.
(The developer was also very responsive to my support requests, which is saying a lot for a open source project.)
Related
I need to create a custom GUI framework for a project. I actually created a very primitive GUI framework which has buttons, images, text etc. But it is pretty simple and I don't have any prior knowledge of designing a GUI framework. The project we are working on got a little serious and I need to do a better job. So, what books or any kind of documentation can you recommend for me?
Note: I want to create the framework probably in an object-oriented way and I will probably use C# but the documentation does not need to be in C#.
Ok, I'm far from an expert but I'll try to write some useful stuff. I don't know much about your experience, so sorry if it seems silly.
I have been working with several GUI frameworks in the past, in various languages (wxpython, gtk+, swing, . . .).
Never as an expert, but here is what I can say :
Keep it simple. If you want to design from scratch, I guess there is no need for crazy complex stuff. Try to keep it as straightforward as possible by reducing the number of inputs and options in your elements.
b. A major common point of all the successful frameworks I know is the abstraction. Each single element can be easily handled, but it still has the power of all its parents.
This allows your objects to be really versatile while simple.
Read lots of other frameworks documentation. I like spending time reading the doc of GUI framework because it helps you understand the abstraction levels. I find the pygtk doc easy to read.
Use other frameworks. Most frameworks do things more or less in the same way. This is especially true for GUI frameworks. Frame containing layouts; menubars and statusbars; I bet 95% of the concepts you want to use can be found in the other frameworks.
In this way, the best way to know how to develop it is to know what you need and how to do it.
Whenever I work on a GUI, I start reading the corresponding series of articles here .
The writer does a great job explaining everything in a simple way, so that you can get along fast with the concepts.
Keep it open. Something I see more and more often is the use of high level syntax for describing GUIS. GTk for example can take XML files in input and create a whole interface out of it. I find it very nice for abstraction, and reuse. And I also greatly reduce the amount of code needed.
I couldn't really find books on the precise subject you want. I think you already searched on the web also.
I hope those small ideas will help you.
I cant decide between this two options.
M Project vs Sproutcore
I'm building an application that will be primary served on mobile but has to be viable on desktop.
Mproject is on the edge with number and variability of his prebuilded widgets and may happen that I will need some more or at least alter some behavior.
So this is kind of down side of Mproject. But it looked for first review that Mproject need less code for basic stuff.
And the second problem comes with the skins. I will basicaly need reskin everything a lot. The design of app has to be very unique.
So I want to know which of them is easily to reskin not just by theme-roller and similar stuff.
I would appreciate any other JavaScript-only frameworks recommendations.
Thanks for all replies.
I'm not sure what kind of application are you building so you should take care with my answer.
M-Project solved our problems fine, and help us to make it clear code ... when you understand how it works. It requires a bit of hard work, the documentation is a bit poor and is a new project where some things are not yet implemented. You can change application look modifying HTML and CSS so I think you should have no problems with this.
Also you can download their code and modify it without problems, it is easy to read and modify if you need any specific behavior.
On other side, I never used Sproutcore, it have a really nice look. But documentation say it is focused on desktop applications. Probably you will not have too much problems to adapt the output HTML for mobile devices, I guess.
Lastly, I think you can take a look on Lungo.js Framework.
Best regards.
I've been reading up on several PHP frameworks, and reduced my candidates to CodeIgniter and Symfony (I know there are many more). Strongly leaning towards CodeIgniter, but have not 100% decided quite yet.
I'm not looking for a general "CodeIgniter vs Symfony" discussion.
One thing keeps coming up in comparisons: people say Symfony is for "advanced" coders and "bigger" sites; CodeIgniter is for "beginner" coders and "smaller" sites. But I have yet to see any technical proof of this. Everything I'm seeing about CodeIgniter feels right.
Can anyone explain structurally and technically where people are basing these statements on?
I want to understand all I can. Once I make a decision, I want to focus my attention on one framework.
Thanks,
Matthew
The biggest technical difference between CodeIgniter and Symfony (ver 1 and 2) is that Symfony is much easier to extend. This is especially true with Symfony2; you can replace entire parts of the framework as you see fit with custom code, or code from other libraries. You can even take any number of core components from Symfony2, and build your own framework on top of it. But, it's important to note that because Symfony is so 'advanced', it has a higher learning curve.
Here's how I see it: CodeIgniter is great when you have a small(ish) project that falls in the category of problems CodeIgniter is meant to solve. But when you want to do something your way, not CodeIgniter's way, you're going to have to fight the framework, which is never fun.
On the other hand if you're working on a Symfony2 project and want to do something your way, you can. It won't necessarily be quick, but it is possible. To me, that's the most important thing - you need to be able to make the framework do what you want it to do.
If you have time, read through the Symfony docs and cookbook - they should give you an idea of what Symfony is capable of and how to customize and extend it.
Everything I'm seeing about CodeIgniter feels right.
Then go with CodeIgniter. The most important thing is that you're comfortable with the framework/toolset. If you complete a project and find that it's lacking in features, you can always check out other frameworks.
I would recommend starting without a framework. If you have been programming awhile and are comfortable with concepts like MVC and why you might implement your code in this pattern, then frameworks start to make more sense.
Frameworks are good for larger projects where there are many programmers and you need a consistent method of building application layers, like MVC. The framework will likely provide some mechanism for object management and a consistent way for you to build application events (controller) and to separate the view logic from the model logic.
My PHP apps have been smaller, so I have not used any frameworks. When I used to code in Coldfusion, on larger apps, I used MachII, Model-glue, Fusebox and ColdBox. Each was good at something, each promoted consistency, but each had a lot of overhead and often times felt like it was in the way. I saw some developers get stuck because of the framework.
I did not start using any CF frameworks until I had build smaller apps without one.
If you like CodeIgniter better, for whatever your reasons, go with it.
CodeIgniter, because of the gentle learning curve and the great documentation. Give other frameworks a go if you ever feel you outgrow CI, which you may never do.
I am looking into developing a commercial application using PHP. Since I have experience in CodeIgniter and it has been working well for me, I decided to use it. Now, if ever my application comes to a point that it needs to grow and have to have custom modifications in the platform, is it possible to modify the CodeIgniter source code to the point that it's far from the original?
I'd strongly recommend not modifying the source code as this is the back bone of the application will make updating to futures releases of codeigniter impossible.
Instead you should be creating your own classes/libraries that extend the core bases. This is best practice.
The codeigniter users guide has some fantastic information regarding this, http://codeigniter.com/user_guide/general/creating_libraries.html
Good luck.
Don't modify it, extend it. Ellislab is good about releasing bug fixes and patches, and the last thing you want is to have to re-engineer all the updates into your new hybrid everytime they release updated source code. Plus, different features and bug fixes are released at different paces for the core and reactor, so unless you plan to lock your framework in at the current version, extending is the way to go.
The good news is CI is built for and encourages extensions of the source. The system folder and the application folder separation are a clear indication of how you should segregate your enhancements from the base libraries.
CodeIgniter is written in PHP. You can completely rewrite the framework anyway you like. So the answer is "yes".
There are many big websites that were written in a different language or build on a framework when they started and have been rewritten many times since. I think a lot of developers (mostly freelancers) are over-thinking when starting out. When I start a project, then I try to get it done and get it out in the web asap. If a website starts taking of - and most of the times start making you money - then you can always take the time to rewrite it.
I think it is a lot more important to spend time when you plan and design your database and tables. I think it is a lot harder to redo parts of your database later on then it is to rewrite the code that uses the data.
Just my 2 cents.
If you have used CI, then you should know that being a PHP framework that all of the source-code is there in the download, furthermore opening the system and application folders and looking through there will tell you a lot. Yes all of the source is there in plain English (plain programming English) and not only is it in plain English but has been extensively documented inside and out (literally that is in the source and in the user-guide). CI gained initial fame from that simple fact, that all code is extensively and meticulously documented.
Beyond all that, the question itself raises concerns that maybe you should study CI a bit further before writing commercial applications using it. Ci is a powerful and very easy to use PHP framework, but it is not a WYSIWYG. In my opinion, a coder should know his tools inside and out in order to be able to create a solid secure and trusted application. The first measure of which is to read the user manual, you should know at the very least everything in it, and since there are 12 sections in it that cover everything from extending CI libraries to creating your own libraries, and everything in between I would say you need to spend a little more time with it.
I want to say though, I am not being rude or trying to shame you in any way I am simply saying that you should learn the framework a bit more before venturing into a commercial application using it.
In the early days of PHP people realized how amazingly easy it was to use and how fast you could write an application with it. At the time the major options where very difficult for new and hobby programmers to use or involved expensive software to run, PHP was free, easy to learn and most of all ran on a free OS. It also took hardly any setup to get going, you could download PHP and essentially be programming in minutes. All of these factors lead to the almost destruction of the language.
Entry level programmers were destroying it with bits of code taken from other applications, never knowing (or caring) what the code actually did beyond the simple fact that it did what they wanted at the time, never considering or even investigating if the code might be harmful. Because of this practice PHP applications that had grown to Goliath sized websites, taking thousands of hits an hour were:
beginning to crash
being hacked to reveal sensitive customer/client data
generally crumbling all around the web
All because since the language was so easy to use that people had taken advantage of it and failed to take time to learn it. PHP was becoming a joke to other professional programmers and wasn't even thought of as a viable application language by many who had dubbed it "the copy and paste" language.
So my advice to you, please take the time to know your tools inside and out, what makes them tick, if they have any gotchas and where they are vulnerable. I understand that in order to learn a language to a professional level you have to build with it so I suggest that you take it slow with CI stick to the core for now. Trust me when I say that even in its purest form CI is an amazing and powerful tool that in the right hands can create awesome powerful web application, but in the uneducated/inexperienced hands it can create havoc and destruction.
So (stepping off of the soap box) I simply ask that if you are serious about creating commercial applications period that you take your time and learn your tools/language become as close to an expert on them as possible. I gurentee that if you do that you will always have work when you need it and you will spend less hours beating your head against the table or worse explaining to a client why their site is down.
I truly wish you good luck, just slow down and learn your trade and you will do just fine.
Yes, Codeigniter is an open source framework. However, I would advise against modifying the core of Codeigniter, as most files can be extended and rewritten safely without modifying the core files which will cause you headaches if you ever decide to update.
To extend a core class by default you would do this in Codeigniter. We'll extended the parser class for this example, but this applies to all classes pretty much. This link in the comprehensive user guide will give you all the information you need to extended and overload methods inside of a Codeigniter core class: http://codeigniter.com/user_guide/general/core_classes.html
I've started tinkering with webOS and it's pretty cool. Out of all the major smartphone platforms I have to say that webOS is the easiest to work with. Currently I'm just trying to get an intuitive sense for the framework and I'm just tinkering with basic stuff like event handling, pushing and popping scenes, etc. This has gotten me far but I'm getting to the point where my applications need a little more modularity since they no longer logically fit on a single stage with multiple scenes. I would like to know how do I go about writing my own assistants and controllers and using them in my code?
Are you using Eclipse with the plug in installed?
Even if not, just copy a basic controller and change around the class names everywhere you see it.
Say HomeController to PreferencesController
Add that preferencescontroller.js to your sources.json file and add a folder in the views called preferences with a file in there preferences_scene.html (I believe).
Since the current framework is MVC, you may also want to think about creating javascript models that would house your validation and even helper files that could be global or view specific. None of this is truly enforced except through your own doing though.
Also, beyond that, in 5 days HP will have a conference that shows off their new devices and possibly even their new modular framework titled Enyo, so that may be more what you are hoping for.