So i have installed Alfresco and have two web applications /alfresco and /share. Whats the difference and purposes of these applications? Can one application exist without the other?
/alfresco
This context points you to the Repository application. It's the "core" app, where the content is effectively stored and where all the magic happens. Back in the old times, it was the one and only application, so that when Alfresco introduced Share, it was the only place where to find a UI for some features. Now, Share is missing just a couple things.
Currently, the idea is that this JSF application should be a kind of Admin only interface, only to be accessed whenever Share is missing something. However, if you really love JSF (really?) you can still opt to use this interface to build your Alfresco implementation.
This application is mainly interesting for its features rather than for its UI: all the connections to external systems, like DB, CIFS or IMAP for example, happen from here.
On a side note, the "original" implementation of Alfresco WCM is built around this application. Anyway, because of several reasons this implementation of WCM is being phased out, with a new implementation built around Share and its concepts (e.g. Sites) that will grow quite a lot soon.
Don't expect new fancy development on this UI.
/share
This is usually intended the main UI for end users. No JSF here (thanks, God!), it's a Spring Surf frontend to Alfresco that focuses on providing a Collaborative environment. Here you will find the concepts of Sites, project/topic focussed containers for content, blogs and wikis.
As all the content is stored via the other application, Share is almost stateless: no DB connection is opened from here, everything is pulled and pushed to /alfresco
via Alfresco REST API and CMIS.
As already mentioned, the new WCM is leveraged from here, as well as all the common ECM features of Alfresco such as workflows, versioning, document transformations, ACLs and so on. Plus, document previews and thumbnails, Blogs, Wikis, Data Lists, ...
This is most likely the UI Alfresco will continue to improve, adding all the whistles and bells they can come up with.