Posted by romasha 52 weeks 2 hours ago

Plone, the Open Source Content Management System that is the fundament of Cyn.in, has been compared with Microsoft Sharepoint multiple times. An interesting comparison has been published recently by Franscesco Ciriaci, owner at Reflab and a Plone Evangelist, based on the compatibility of Plone and Sharepoint with different platforms and browsers.

Check out the Plone vs. Sharepoint 2007 comparison here:
http://francescociriaci.wordpress.com/2009/08/20/plone-vs-sharepoint-round-2-a-by-platform-feature-comparison/

This makes Cyn.in is leaps and bounds ahead of Sharepoint in terms of enterprise collaboration, because Cyn.in starts where Plone stops. While Plone is a generic web application platform, Cyn.in delivers an integrated, out-of-the-box collaboration suite for the Enterprises that has all the benefits of Plone and enables free form communication and collaboration with a strong focus on enterprise information security needs.

Views: 1,303, Comments: 0

Posted by dhiraj 1 year 4 weeks ago

Video Notes: HiDef (1280x720), switch to full screen for best effect. Low bandwidth users should probably switch HD off by clicking the button which appears when you play it.
We've been working on improving the cyn.in buildout for the upcoming version. One of the things we've added is the collective.omelette recipe. Leaving the funny name aside, (it's a pun intended on the fact that pretty much whatever you do in a buildout is based upon pre-defined "recipe"s and that this one is really special in that it mashes up all the code in all available products, projects and everything that's there in your buildout together into a single linked folder chain. And if you didn't get the pun, ignore it, it'd not important for the rest of the stuff here.) Let's start with the usual alert:

Warning !

Warning! Danger, Will Robinson! Geek Developer alert! This video and blog post is for the software developer audience. And probably only of interest to people who think that building out cyn.in from source is pretty cool, and would appreciate another productivity tip that would greatly enhance their way of working with cyn.in. Everybody else will probably not make much sense of this, but is of course welcome to try, and fit in. ;) Ok. So here's my list of assumptions:
  1. You got cyn.in working from buildout
  2. You're surprised at the complexity of the codebase - all of cyn.in stuff exists in the src folder, but when you go into parts, and eggs, there's just too much stuff there to really comprehend and figuring out which code goes where, is really painful. This recipe is for you.
  3. You're getting a hang of things. You understand that most of the plone codebase is concentrated around the CMFPlone product, and then you look for plone's kss and you can't find it, for example. This recipe is for you!
  4. You'd actually like to use a GUI IDE tool to work with, rather than just using Notepad++,  gedit, vi, or whatever else it is that you do use for that sort of thing. Something that will give you intellisense for autofilling function names, showing you function arguments, and doing reference lookup jumps into outside code files, when the need arises. This recipe is for you, also.
In this video, I show how one can add the plone collective recipe called Omelette to your buildout. And then how it can be used for fulfilling the above. In this example, I show how the Komodo IDE product from ActiveState can be set up to work with cyn.in. This will give you the above intellisense, and yes, that's a major improvement over what you do currently. You could alternatively set up Wingware's Wing IDE for the same effect, in the same way, (and then some - in that you can actually hit debug breakpoints, and inspect variable values, but I use Komodo IDE to show this off because it's a bit simpler to set up and to use as well). And then there's some other IDE projects out there, but I'm unsure of their maturity. The first step is to get a normal running buildout. Then you just add a new "part" to your buildout and then configure it to the way you want it to be. In the setup I show, (which is the way it's going to be present in the upcoming code-base in cyn.in), we're setting up all source code in a predictably named "allsrc" folder, which is a sibling to the currently existing src folder that you're possibly already comfortable with. Once you build the buildout after you add the new part to it, you'll notice the folder getting created, and then when you go into the folder and have a look, you'll see that all source code that you need is neatly arranged in non-nesting folders. This is the linux "ln" command at it's finest, your code is not actually copied, it's just linked to. And yes, this recipe only works on linux, for now. All of zope, plone, cyn.in and all constituent products will be available in the allsrc folder after you run it, all linked up to go to their original locations, but still usable directly as it is available in the allsrc folder.

Cool?

Did you really get that? Let me restate. The code files you're staring at in the allsrc folder are not actually present, there. They're still at the original places they were at. This is a convenience recipe to "virtually" aggregate all the source code into a single root folder. Do not be confused when you're using your version control system (svn,git,mercurial whatever) with this. That said, editing the source in the allsrc folder is perfectly fine, and in fact that's the whole idea in the first place! Your code, your edits will all be done in this conveniently rooted folder, from your IDE. Just be careful that you're editing your own code and not going modifying plone itself, or any other external (non-development) egg directly. If you do this, your code will actually work on your instance, but will not go to other developers when you commit it, and worse, when you re-buildout, your changes will be overwritten - editing base stuff is still to be done in the normal way, by overriding and subclassing, and so on, in your own products. The video shows how convenient navigation becomes. Note the simplified folder chaining, there's no need anymore to have src/ubify.xmlrpc/ubify/xmlrpc and then, the code for it. xmlrpc is directly available at allsrc/ubify/xmlrpc, with the other parts lining up right beside it. Once you've looked at the refined code structuring that the Omelette recipe does for you, then it's time to move on to the next phase, actual editing. The video shows how easy it is to configure your Komodo IDE project to point source code lookups to the allsrc folder, and then goes on to show how the in-code lookups for functions, arguments and Ctrl+Click jumping to actual resource works. Try it out, it really aids in understanding the code flow.

Links:

Views: 1,079, Comments: 0

Posted by dhiraj 1 year 11 weeks ago

A big part of being a cyn.in developer is being one with the fine art of building out... your buildout. Geek / Tech warning! This post is best read if you're a software developer interested in working with cyn.in (and / or plone) and are interested in improving your development productivity. Ok, that dire warning out of the way, let's get down to it, shall we? :)

I restate my assumptions:

  1. You downloaded the cyn.in source snapshot.
  2. You actually opened the README file and went through it.
  3. Figured out the dependencies and got through the buildout procedure
  4. OR you're starting off from the plone.org community and have got a plone buildout running (yes, this applies to you too!)
  5. You'd like to reduce the bandwidth / time it takes to build a buildout

So why does buildout take so long?

Well because cyn.in depends upon a whole lot of python eggs (and even a few old-style zope products) that are downloaded during buildout. The biggest of these is plone itself, because that depends upon more code than you'll ever end up going through (or at least that's what it looks like when you're starting out).

So how do we optimize our Internet usage? Well, several ways. Read on:

download-cache: This is most important to you if you build a lot of new buildouts from scratch. And when I say from scratch I mean on new operating system installs, or if you're into virtualization and appliance building then this one's for you! You can set this to a path outside your main buildout directory and instead of downloading directly from the Internet, buildout will first consult your download-cache directory to see if the file's already there. So while buildout will still spend time looking on the net for the correct version to download, for each egg, once it does figure out which one, it'll usually find the file already present in your cache. The idea of course is that your downoad-cache directory will be a network share somewhere that's mounted locally on a path, so you always have a pre-primed cache. You should have this setting in your own personal override config, (user.cfg in cyn.in buildout is a great example of this!). This is the minimal override that is usually required for per-buildout case, where you set up your personal settings, like port and network ip to bind to, the effective user to run under and so on. If you keep your download-cache setting in your main buildout.cfg then all developers will be forced to use or override it, which is not a good thing to do.

download-directory and eggs-directory:

Most developers should already be aware of this one. When developing you often have to recreate new buildouts repeatedly on the same computer with different filestates, typically in a multi-developer team where everyone's working on different branches in subversion and so on. For this kind of scenario, buildout provides these 2 settings to speeden things up, some. In buildout, packages can be marked to be on particular versions or they default to the latest (more on this in the newest=false setting). The idea with these 2 settings is that you should set them in your user-account-wide defaults file. Where? In linux, usually in your /home/username/.buildout/default.cfg folder.
/home/username/.buildout/default.cfg

That's:

  • /home is where your user homes are
  • /username is your's (just used cd ~ to land there, and then the pwd command will show you where it's at)
  • .buildout is a folder you create in it
  • default.cfg is a file that contians your defaults for buildout
In this default.cfg file you should put in these 2 lines:
download-directory = /location/to/where/you/want/all/downloads eggs-directory = /location/to/where/you/want/all/eggs
If you put these settings in the correct home folder location (and then go and actually create the target folder paths - buildout will error if they're not already present!) then buildout saves downloaded files in these locations as a default. The advantage to doing that account-wide for your user is that by default all buildouts will go there and re-use the files already present first. This is best used in combination with the below setting, newest=false. Note that the files here are used directly by every buildout made by your account. That's different from the download-cache where they're downloaded from. Why is this important? Well in the very, very, rare case that something in your normal download or egg directory is causing a problem, you can override it in your user.cfg override and fix the problem.

newest = false

This should be present by default in your main buildout.cfg itself. That way when any developer builds the buildout, it will by default only download the dependencies that are missing, if it finds matching dependencies already met, it will not go looking for a better one. This setting when combined with the above user-account default one is like magic, you can re-buildout any number of times after the first one, and do it without any Internet consumption at all! When you actually want buildout to look for better alternatives, then you simply add -n (that's small n, not capital. Capital N does the exact opposite, same as the setting above!) to your buildout command line and it will go hunting for the latest and the best.

So what's your buildout command line looking like now?

First time or force-check for newer dependencies is like this:

./bin/buildout -c user.cfg -n -vvvvv

And "normal" re-buildout is like this:

./bin/buildout -c user.cfg
The -c user.cfg part means that buildout should use user.cfg as configuration. user.cfg extends buildout.cfg, overriding just the personal settings that you want to change from default. -n tells buildout to go hunting for fresher eggs -vvvvv is a way of getting as much verbose log output as possible. More the v character's here the more the verbose the output. You want verbosity when you're doing it the first time - to diagnose error messages correctly, if they happen. In normal re-buildout you don't need these settings because you want the default, newest=false and verbosity is just pointless scroll. Hopefully that should speed up things some, especially if you're struggling. There are some more advanced techniques, of course, like ingeniweb's eggproxy product, which is the perfect way to create a fast, pass-through cached mirror of the PyPI on your LAN - that too only the eggs you need and re-use. But that's out of the scope of this post, perhaps some other time.

More?

If you want to read more about these sort of things then do let me know by adding your comments. If you have other tips to improve buildout efficiency then do put in the reference links or whatever else you can tell us about them, thanks!

Views: 731, Comments: 0

Syndicate content