Rails ecommerce site with Spree what should be ideal blog solution - ruby-on-rails

I have e-commerce site using spree. What should be ideal blog solution please suggest. Since the blog has to be updated almost daily it should be like CMS with end customer able to do the same. Should I use spree-blogging-spree gem or maybe blog hosted separately on wordpress ? What would be little scalable and convenient for a zero tech customer?

By your own definition ("zero tech customer") I would avoid any solution involving coding or custom code. Blog is an area where dozens of very good solution exists "of the shelf", so I would go for a WordPress or equivalent. You could even get the hosting done for you.
Integration can be as simple as putting the blog on a subdomain, for example if your ecommerce is hosted at pikachu-go.com, you could have blog.pikachu-go.com to point to the WordPress instance.
This means that the blog & ecommerce are totally independant, which should be for the best. You'll have a bit of work to ensure visual consistency between both, but a good palette and a logo may be enough to start.
If for any reason you really need the blog to be part of the same codebase (against, I advice against that), you may want to have a look to blogs that can be added to your Rails application as Engine such as https://buttercms.com/rails-blog-engine/ or https://github.com/kiddsoftware/rails_blog_engine.
Per the doc:
Engines can be considered miniature applications that provide
functionality to their host applications
So this is a way to deploy it inside your Spree app without resorting to custom code.

Related

How to manage static content in a rails app

I'm running a rails app for interactive learning for kids. We also have quite a few static pages like, landing pages, team pages, case studies etc. This is also deployed in the same rails app.
I would like a easy way for my team to manage the content without depending on the tech team. I can build an admin interface to edit these pages, but I don't want to recreate a CMS. I checked out Jekyll but the markdown syntax makes some tech novices uneasy.
Someone suggested using weebly/ wordpress and host it in a subdomain. I don't want to go overboard and add an additional layer of maintenance to the app.
I've a mongoid project and would appreciate any mongoid gems.
RefineryCMS is a popular content management solution for Rails apps. You can add it to your existing Rails app, as described in the guide. RefineryCMS is targeted at the end user experience, you don't need extensive technological knowledge to use it.
There's an online demo of the CMS which you can find here. You don't have to edit the pages using Markdown, it has a WYSIWYG (What You See Is What You Get) editor as well.
If you're looking for another CMS, you can find other solutions quite easily with the Ruby Toolbox.

HOW: Static company website with Rails

I have a really stupid question in my mind.
I have used Wordpress to create a website for long time, but I dont want to use it anymore. And now I am looking for little bit different approach. Otherwise, I am quite new in Ruby on Rails. I have read some books and I am not feeling in this matter so confident. So, here is the deal:
My friend asked me to create a simple website for his company. He wants only super simple static website which will contains these pages:
Home
Products
Contact
Each page will contain simple information and there is no need to implement contact forms and other basic functionalities. I also want to deploy this app on Heroku, because he has not a lot of money and we are looking for free hosting. Moreover, I think that the best approach in this matter will be some kind of CMS which will help him to edit the website.
The overview of final solution:
Static webpages with simple CMS
Using twitter bootstrap for basic layout
Deploy on Heroku
I appreciate every contribution in this matter.
Thank you
Everything you have said suggests that you should stick with WordPress. It's perfectly capable of presenting a non-blog static website (use Pages instead of Posts) and there are some excellent themes available. WP has, over the years really become a CMS that's also good for blogging. There are other tools like Drupal that may be appropriate.
I set up a WP site with almost exactly the same goals for some very non-technical people; with a little training they eventually learned how to manage the site, upload images, add content, grant permissions to others, and do a lot of other pretty cool stuff. I have been using Rails since 2007, but for that case, it was not the right solution.
Rails is a very (very!) sophisticated web development environment used to build complex and scalable dynamic websites. With power comes a level of complexity several orders of magnitude higher than WordPress. Even if you use refinerycms you still need to do a lot of complicated setup, and need to know a lot of stuff. Even if you're using Heroku and following a RailsCast like the one for refinerycms, you'll undoubtedly hit some wall where you really need to understand more ... Rails is alluring this way -- seems simple.
If you are using this a reason to learn Rails, and are willing to invest some time, then by all means go for it. But if you want a simple solution, it's not the way. Learning Rails is like learning to fly a plane, but harder.
For static pages with rails, you can use High Voltage gem. You can find the detailed usage of this gem in this blog post . Once you create the pages, then you can easily deploy your app as like normal rails app in the heroku.

Great ruby on rails examples of almost real world applications

Great ruby on rails examples of almost real world applications:
Can somebody give some links of sites that have such codes using the best practices in structure, implementing it, models, controllers, security, views, caching, modularizing and so on? thanks
You could start with guides.rubyonrails.org. They have a lot of information on there. A very good example to start with. Start with the Getting Started link. There are also a lot of other examples on that site.
The next step you might be better off buying a book on this subject. I purchased Simply Rails 2 by Patrick Lenz. Also a very good starter book with good examples. He walks you through an app that's similar to Digg. This will get you into the Model-View-Controller mind set.
If you want to go further, I would suggest Agile Web Development with Rails, Third Edition by Sam Ruby, Dave Thomas, David Heinemeier Hansson. I would suggest the PDF because I use it as a reference and searching within the 774 pages is helpful to say the least. This is my favorite but definitely not a starter book. It's broken into two halves. The first half is a tutorial on how to write a shopping cart. With this example you get into the database models, migrations, sessions, helpers, ajax, routes, security - shows you how to create your own authentication process and more. The second half of the book is more of a reference guide and goes into greater depth than the application tutorial.
From here I would look into plugins to help you out. Search on www.github.com. They host a lot of the open source plugins available. Don't go too wild on plugins because too many will defeat the principles of being RESTful. For security/authentication I would reccomend Authlogic. I still think it's beneficial to go through the tutorial on how to create your own authentication (from the Agile Web Development with Rails book) to see what actually goes into this plugin.
Lastly, but not the least bit important is to start thinking about how you will deploy your app. You may think this is trivial but the longer you put it off, the harder it will become. Look into capistrano and deprec gems (plugins) to deploy onto a VPS. I've had numerous problems deploying to a shared host.
Don't start with the most complicated part of rails like I did. Work from the guides first and get into more complicated apps. Rails has a pretty steep learning curve.
Hope this helps.
Found your post while I was looking for the same thing, this blog post was useful:
http://blog.chrislowis.co.uk/2010/05/31/five-rails-apps-to-study-and-learn-from.html
The Real World Rails repo brings 100+ (and growing) active, open source Rails apps together in one repository using git submodules.
You can clone the collected codebases and learn from Rails apps written by experienced developers. You’ll find all the codebases in the apps/ subdirectory.
Apps you'll find there include Discourse, Diaspora, GitLab, Hound, Rails Contributors, and the Ruby Gems web site.

How do I have plugin architecture in Ruby on Rails?

I have to built a social networking site on Ruby on Rails. The features in the site may change from time to time; so we will need to add/remove features with ease. Moreover, we may be building another social networking site. Due to these reasons, we are thinking to build a basic framework for social networking sites in RoR with the feature to install or uninstall extensions to the framework.
I worked previously in Joomla! CMS and its architecture for adding/removing extensions is kind of what I am looking at. In a Joomla! installation there is usually an admin side from which you can add/remove/customize extensions.
I am new to RoR and finding it little difficult to decide how to do this. Any help will be appreciated.
UPDATE 2015: this was answered in 2009 a lot has changed
Plug-ins have been superseded by Gems and Engines
For all the information you need on Engines:
http://guides.rubyonrails.org/engines.html
Engines are a fantastic way of building encapsulated and reusable code for your rails apps.
Original Answer for Reference
On the development side Rails Engines and/or plugins is probably what you are looking for.
Rails Engines are small subsets of an
application that can be dropped into
any of your Rails applications and
handle common parts of the application
from scratch.
Say for example your social networking application has a wiki, blog, chatroom etc. You would more than likely want to create a wiki engine, blog engine and chatroom engine.
Engines allows you to re-use such functionality within different applications so you do not have to repeat yourself.
Take a look at: http://rails-engines.org/
Some support for ‘engine’ plugins has
been merged into the Rails core
codebase in Rails 2.3.
I would also recommend taking a look at some public projects say on github and see how people have used engines.
Take a look at some engines:
Wiki-Engine
Skinny-Blog-Engine
Other useful links for reading
Tips for writing Engines
Rails Engines, Railscast by Ryan Bates
The Russian Doll Pattern (PDF)
In functionality terms you could still have an admin area that could activate certain features ie. your blog or wiki by allowing users access to such areas with a permissions/roles system.
ACL9
role_requirement
restful-authentication
If you want to build a CMS which supports some kind of extensions like in Wordpress or Joomla then you will have to either build it and provide guidlines or at least look into how you would upload/install Engines/Plugins from a user perspective.
Not sure on the security implications of this
Redmine has put this kind of functionality into their awesome application. You may want to dig around the source code for tips and clues
Finally Adva_CMS has basically adopted this approach and have created a number of Engines for their CMS application
HTH
Engines are still a pretty solid way to go, the new location to get info on those is located here: http://guides.rubyonrails.org/engines.html
But what you need is really more application specific. A lot of applications develop these things organically over time. They start out by hand crafting a few of these and then they re-factor them periodically until they find patterns that align with software design patterns and then they develop a plugin framework.
Are you going to expose your interface to end users? To third party developers? What parts of the application are controlled by these plugins? Is it just the presentation tier? Does it affect the data model? Consider the fact that when you publish any kind of external interface, you're developing contracts that you need to honor.
You might check out these design patterns: http://en.wikipedia.org/wiki/Software_design_pattern. They will help you figure out how to manage your development process. If you're just working on plugins for internal use, then what's the real purpose of them? What makes them different than modules?

Rails for ecommerce site

I was planning on using RoR for an upcoming e-commerce site but keep reading
comments that give the impression that this framework is not yet fit for this type of a commercial application.
What is the state of it? May it be used for large scale online stores etc?
Is compatibility and the frequently changing framework an issue to worry about?
Late answer... but I feel I should share some of the latest stuff available.
Is compatibility and the frequently
changing framework an issue to worry
about?
No. But it sounds like you are a beginner with Rails -- anyone starting a big e-commerce project should consider sticking with a framework they are already comfortable with.
If you definitely want a Rails app and your site is primarily an e-commerce shopping site, I recommend you look at Spree (http://spreecommerce.com/).
If your site is primarily a web application with a small purchasing component, consider using ActiveMerchant directly to hack together your own simple shopping page.
If you are making a primarily e-commerce shopping site, you would do well to at least consider non-Rails solutions. There are so many options for standalone web stores, shopping carts linked to CMS apps like WordPress and Drupal, third-party services for a fee (e.g., Shopify for shops, Chargify for subscription services) and many of them can be customized with minimal coding.
Rails is up to the task, but if you aren't already a "Rails guy" there's no particular reason to choose it for a new e-commerce app.
yes, rails can do it quite well. check out active merchant site, as well as shopify, which is a rails site specifically for ecommerce. as far as changes to the framework, i've found them pretty easy to keep up with on our applications.
Agree with other's posts about activemerchant. That combined with someone like Braintree as the gateway (who are programmer oriented) make it pretty simple to do.
It depends on what features you want in your system.
Chris mentioned some tools for payment processing and order / cart management.
If you want something for a 'large scale online store' then I'm not sure there is anything yet. Specifically when I worked with ATG Dynamo Commerce Server, there was a massive amount of effort invested in their pricing, discount and promotion elements.
Very late to answer but try out http://www.ror-e.com
https://github.com/drhenner/ror_ecommerce
Disclaimer: I wrote it, but it is more developer friendly and starts you off with a lot of best practices baked in. Good luck

Resources