ProdigyView 1.5.3 - MongoDB, Authentication and Image Manipulation
Finally released ProdigyView version 1.5.3 . The version has plenty of cool updates in it.
- GridFS Addition
- Batch Inserts
- Options(such as fysnc)
- Overall improvements to the queries
- Auth module that is integrated with the database
- Auth model that has both hashing and encryption
- Improvement to user role checking
- Image Manipulation
- Drop Shadows
- Drawing of squares and ellipses
- Watermarking with text
- Watermarking with images
- Converting Formats
- Making animated gifs with text and images
- Improvement To PV Standard Search Query
- Fixing a few bugs and warning in various places
- New data structure called PVStaticInstance
I went back and fixed up a lot of the other examples and added new ones. The examples also have an index file now to hopefully make them easier to navigate. Next will be the tutorials on these features. I think the most exciting tutorial will be the ones on MongoDB.
An little odd thing I noticed…the previous versions released had the majority of their downloads on the core version, which is only the libraries. That surprises me because the sample system contains the necessary examples for learning how to use the framework, and the placement of the DEFINES, which is essential for using ProdigyView.
ProdigyView 1.5.3 http://www.prodigyview.com/downloads/coreversions
Today was the release of ProdigyView version 1.5.2 . The most exciting update for this release is the integration of MongoDB. Other additions to this version update include:
- Mongo Support
- Added Add SSL detection to router
- Change names of the classes with Render on the end
- Fixed problem with text truncating
- Add Query Builder
- Fixed conversion input and output
- Improved Mail Configuration
- Add environments to the configuration
Download is available here: http://www.prodigyview.com/source
Many more updates to come in the later versions. If you have any updates that you want to see happen or want to become part of the team, shoot me an email at email@example.com
Day 36 - MongoDB Support
Oh man, its late but as promised, I will deliver something everyday for 60 days. And today’s delivery is bigger than some tutorial, I’ve officially added support for MongoDB to ProdigyView! For anyone who is not familiar with MongoDB, it is a noSQL database that uses a JSON like syntax called BSON, and stores it’s data in collections and documents. If you are interested in checking out Mongo, you can do so here.
Personally, I’ve been working in Mongo since the latter half of the year on a major site, and it is honestly a love/hate relationship. In Mongo, you do not have schemas which is great because you can add columns as you please. But at the same time you do not have relationships which can suck. I think the line “With great power comes great responsibility” suites Mongo because it is a powerful database that you HAVE to have good logic too use.
The Mongo section is not yet documented but will be shortly. To use the Mongo insert, update, find, and delete, in the PVDatabase class use the query builder methods and the prepared statement methods. If you have set your database type to mongo, the methods will automatically abstract to use the mongo connection. A tutorial on it will be coming soon.
As of tonight, ProdigyView now has Mongo support and is only available in the GIT repo. TOMORROW I will add v1.5.2 to the example system with more examples and to the actual site.
On a completely unrelated topic, I want to say to not to let others take advantage of you for less than your worth. If you don’t know your worth, take the time to find out and if you do and are not where you should be, do not be afraid to step up and say something.
Day 34 & 35 - SMTP Email , Option and Christmas
Right now, I’m in a really good mood. I feel like as I’ve gotten older, I value the time I get to spend with my family now during the holidays. Even without the gifts, a good meal and time with friends and family would be more than enough. I would also like to specially thank the people who had to work. I mean people who have to work in the power plants, hospitals, police officers, etc., who continue providing their services so the rest of us can enjoy ourselves.
Yesterday’s tutorial was on SMTP email in ProdigyView. Preferably, I use a service such as MailChimp to send out emails. If not, I use a SMTP service such as RackSpace mail or GMail for sending out the emails. I rarely ever use the normal PHP mail function. The reason being I want the recipients to receive the letter and not have to worry about it going to spam.
The Options tutorial is on using the Options in the PVTools. This is the first database bound thing I am going over. To use, remember to completely install ProdigyView or at least install the options table. Options are a great way of quickly storing and retrieving data that may not fit into any schema or you do not feel like designing a schema for. I mostly using it for storing persistant configurations for an application.
SMTP - http://www.prodigyview.com/tutorials/slideshare/367/107
Options - http://www.prodigyview.com/tutorials/slideshare/368/106
Among a few other additions and fixes, today I started adding the MongoDB support to ProdigyView.
Right now the beginning of Mongo Support exist with the Prepared Statements of insert, update, and delete. I need to rewrite the query builder for the select statement before I add in the ability to search. I also need to write the query builder for non-prepared statements. At that point, Mongo integration should be done.
I must say I am impressed at how easy it is to manipulate the mongo database through the php Mongo extension. Very easy to insert, update, query and find.
If you are interested in testing it out, the branch on git is https://github.com/ProdigyView/ProdigyView-Core/tree/mongo . Remember to play with Mogno, install the pecl extension and the mongo.so to the php.ini.
Day 24 - Understanding and Basic File Cache
The day before vacation is the worst day. Especially when a whole server infrastructure relies on you for a major site going live in 2 days and everyone is panicked there isn’t a fall-back person. The vacation might be cut a little short if the shit hits the fan and stuff breaks.
Today two tutorials were released. The first tutorial outlined caching in general and gave an overview of Varnish, Squid, XtraDB, Cache Lite and other caching solutions. This was done to provide a direction caching.
A lot of sites give good tutorials and explanations about using cache in php, the majority of them demonstrating using ob functions (ob_start, ob_flush, etc). A newcomer reads it and feels they have a competent caching solution but do not know about database caching or server caching because they are not exposed to it. The point of this tutorial was merely to give exposure and encourage further research be done by interested parties.
The second slideshow posted today was about using the basic caching in ProdigyView. The caching utilizes the file system on the server and is a good solution for basic caching. Tomorrow’s tutorial will be on memcache and I will be posting it from the beach.
Understanding Cache: http://www.prodigyview.com/tutorials/slideshare/355/102
File Cache: http://www.prodigyview.com/tutorials/slideshare/356/102
Day 17 - Prepared Queries and Database Tips
Prepared Queries are templated sql queries that can improve performance of executing queries in your database. But I have to stress: this not the magic bullet that will improve performance with your database. Below I am going to go over some other ways you can improve the performance of your database.
- Indexes: Indexes can greatly improve the performance of your database, but at the same time, can greatly hurt it if you do not place your indexes correctly. While indexes can increase the speed of select statements, they can decrease the speed of update, insert and delete statements.
- Stored Procedures: Using stored procedures can improve performance and scalability of your database.
- Data types: Choose the appropriate data types for your fields. An example, you do not need the data type text or varchar (max) for a 5 digit zip code.
- Schema Design: When designing your schema, normalize your data first, set up primary keys, foreign keys, etc. After that then you can denormalize.
- Queries: Writing good queries takes practice but avoid things like expensive operations (ex: NOT LIKE), implicit or explicit functions in the WHERE clause, do not use long triggers, and return only the rows/columns needed.
- Storing Images: This is controversial but do not store them in your database. They contain large amounts of data.
Keep in mind that each database has specific procedures for improving performance for that database. These are very broad tips. Here is today’s powerpoint on prepared queries in ProdigyView.
Prepared Queries: http://www.prodigyview.com/tutorials/slideshare/333/99
Day 16 - Database Table and Columns
Today’s tutorial was on creating database tables and the columns. The purpose of ProdigyView’s table and column creator is to modify the schema of any database without knowing the exact semantics for that database. It’s part of how ProdigyView is database agnostic.
Currently it supports Mysql, Postgresql and MSSQL but the functionality of the feature still needs to be expanded and that will take place in future development along with expanding it to SQLLite. Thankfully this feature will not have to be adapted to MongoDB since that NoSQL database does not have a schema.
Tables and Columns http://www.prodigyview.com/tutorials/slideshare/332/99
Day 15 - Am I really only 1/4 of the way through?
I sit down, exhausted, staring at the ceiling, and it hits me that this only the 15th day of doing these tutorials. 60/15 =4 so I’m only 1/4 of my goal and I look at it in two ways:
The first way is almost self doubt, can I do 60 days of releasing stuff everyday? Is this going to be too much work? And am I going to burnout?
But then I have to look at all the positive. It’s something I can say I did, I’ve learned some things about presenting information, I’ve gotten good feedback and have talked to some really cool people.
I guess what it really comes down to is this, if it wasn’t hard at times, was it really worth it?
If we’re growing, we’re always going to be out of our comfort zone.
That was one for James Maxwell.
Today’s tutorial was the beginning of using the database. I figured this is the second most important tutorial behind the design patterns because a web application is likely to need some sort of database. The basics of today tutorial was connecting to the database, sanitizing data, and executing query. As the week progresses, we will get into more advanced database interaction. And for NoSQL fans, MongoDB is in the process of being integrated into ProdigyView.
Database Basics - http://www.prodigyview.com/tutorials/slideshare/331/99
Day 14 - Anonymous Functions and Designs
As we come to an end with the design patterns, I hope that these tutorials not only taught you about design patterns in ProdigyView but also how to use design patterns while programming in general. Learning these concepts is part of what separates good programmers from great programmers. It should change the way you look at code and give you the ability to write more efficient and elegant code.
Yesterday was the conclusion of the design patterns and covered my favorite part, using them with anonymous functions.
Using an anonymous function saves time when using the design patterns because you do not have to write out a class to do one simple operation. Yet, it does not give you the functionality that a class does. For example, anonymous functions can not have design patterns in them because they are considered a different scope. So choose wisely when using a closure vs a class.
Anonymous Functions and Design Patterns: http://www.prodigyview.com/tutorials/slideshare/330/98
Also, if you look at the example provided with the tutorial, the observer, filters and adapters are all implemented in one method. A lot of the code in ProdigyView is built the same way for the developers convenience. ProdigyView is designed to be a very mutable framework.
Now that the most important aspect of ProdigyView has been covered, next will be utilizing the database.