Web Studio Configuration

cancel
Showing results for 
Search instead for 
Did you mean: 

Web Studio Configuration

resplin
Intermediate
0 0 1,274

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Web Studio

NOTE:  Web Studio is no longer part of the Alfresco Community build.  The Surf framework that Web Studio utilised has been committed to Spring Source http://www.springsource.org/extension.../se-surfSpring Surf is the underlying framework used by Alfresco Share.

The Web Editor Framework is the recommended platform for developing rich in-context WCM capabilities.



Back to Web Studio.

This page provides details regarding optional configuration settings for Web Studio that you may wish to explore.

At present, these consist of both configuration options and extension points.  As we move forward, we'll make further distinction between the two.


Alfresco Explorer


This section assumes that you are familiar with making configuration changes to the Alfresco Explorer web client.


Configure Web Studio as a WCM Preview Server


You can configure Web Studio to act as a WCM Preview Server so that your Alfresco WCM users can instantly preview their site directly against Alfresco Web Studio.

We've provided a sample file along with Alfresco Labs 3 Final that you can de-sample and make available to your Spring runtime.

The file is called web-studio-preview-context.xml.sample.

It defines a new Spring Bean:



<beans>

   <bean id='PreviewURIService'
         class='org.alfresco.web.bean.wcm.preview.WebStudioPreviewURIService'>
      <property name='studioURI' value='http://localhost:8080/studio' />
   </bean>

</beans>

If you then restart Alfresco, the Alfresco Explorer client will use this PreviewURIService instance to resolve Web Project preview servers.  In this case, it will redirect preview requests to the URI defined by studioURI.

In this way, users can work on Surf objects via AVM CIFS, FTP or what have you and then instantly preview their Surf site against Web Studio.

Web Studio will still offer in-context overlays and all that fun stuff, however, the primary benefit it offers is that it will automatically switch sites and render back whichever site was requested - all directly from WCM in Alfresco Explorer.

Note: This is a very basic implementation of this service.  It will be changed in the future to allow for things like dynamic switching of preview servers based on Web Project type.  That said, it is useful to try out for purposes of exploring the capability.

For more information about building your own Preview URI Service implementations, please check out the Preview URI Service article.


Web Studio Application Configuration


Inside Web Studio, you will find a file called web-studio-config.xml which defines configuration properties for the Web Studio application.  These settings can be customized to suite your needs.

That said, it is not recommended that you make changes to this file.  Rather, we recommend that you introduce a new file called web-studio-config-custom.xml and drop it into your /shared/classes/alfresco/web-extension folder.

A sample file might look like this:



<alfresco-config>
   <config evaluator='string-compare' condition='WebFramework'>
      <web-studio>

         ...

      </web-studio>
   </config>
</alfresco-config>

Switch Web Studio to Development Mode


Web Studio validates and minimizes its JavaScript during the build process.  Thus, while the source JavaScript ships with the distribution, it is entirely ignored unless you opt to switch to development mode.

By switching to development mode, Web Studio will not use its prearranged, minimized JS file and will instead load all of the original JS files by hand.  This makes things a good bit slower but also allows you the ability to tweak and play with the source files.

To switch into development mode, you can simply provide the following block inside of the WebFramework condition block.



<web-studio>
   <developer-mode>true</developer-mode>
</web-studio>

You will have to restart Web Studio for these changes to be picked up.


Add your own Applications and Sliders


Web Studio was built to be extensible so that you can have many applications inside of it, each provisioned with one or more sliders (or applets as they're referred to in the configuration).

You can declare a new application by adding an application block to the configuration.  The out-of-the-box webdesigner application is shown here:



<web-studio>
   <applications>
      <application>
         <id>webdesigner</id>
         <title>Web Designer</title>
         <description>Web Designer Application</description>
         <bootstrap-classname>
            WebStudio.Applications.WebDesigner
         </bootstrap-classname>
         <bootstrap-location>
            /overlay/default/applications/webdesigner/webdesigner.class.js
         </bootstrap-location>
      </application>
   </applications>
</web-studio>

Sliders are defined in a similar fashion:



<web-studio>
   <applets>
      <applet>
         <id>pages</id>
         <title>Pages</title>
         <description>Navigation Applet</description>
         <bootstrap-classname>
            WebStudio.Applets.Navigation
         </bootstrap-classname>
         <bootstrap-location>
            /overlay/default/applets/navigation/navigation.class.js
         </bootstrap-location>
      </applet>
   </applets>
</web-studio>

You can then bind sliders into one or more applications by using an include:



<web-studio>
   <applications>
      <application>
         <id>webdesigner</id>

         ...
         ...

         <include-applet id='pages' />

      </application>
   </applications>
</web-studio>

Feedback


We would like to make Web Studio as extensible as possible.  If you have any feedback on new or improved hook points or on ways by which the product could be improved, please drop us a note on the forums!