Newbie Questions

Topics: General
Dec 18, 2012 at 4:34 PM

Hi, I'm just beginiing to explore Orchard and also using WebMatrix for the first time too.

Here are some questions:

1. What web server is being used when I am running and editing my site? I see activity on port 28005 but see only the OS 'System' process listening on this, so is there some service installed as part of Orchard?

2. Is IIS involved anywhere when I make a default installation on my dev machine?

3. When I want to deploy/publish my site to another machine is that easy or must I also install something on the target machine?

4. If the site (or the default demo site) is not hosted in IIS, how does one combine Orchard with ASP.NET and C#?

5. Can I use ASP.NET provider support for user registration and so on or is this all supported using Orchard and so there is no need for ASP.NET providers?

Thanks in advance.

KC

Dec 18, 2012 at 5:07 PM
Edited Dec 18, 2012 at 5:08 PM

Congratulations on choosing Orchard.

  1. When you launch Orchard from WebMatrix, IIS Express is used to serve the site. When you launch Orchard from Visual Studio, by default the Web Development Server will be used (which is a web server that supports ASP.NET applications), unless of course you configured the web project to be hosted by IIS Express or IIS.
  2. See answer 1
  3. Should be trivial. If you deploy/publish to a server, just make sure you have .NET 4 or higher installed and of course IIS, and perhaps SQL Server (Express) if you're not using SQL CE or MySQL (if you use MySQL, you need that one installed obviously).
  4. Not sure that I understand your question, but know that Orchard is an ASP.NET MVC application itself, so you don't even have to wonder how to combine C# and ASP.NET with Orchard: Orchard wouldn't be able to exist without the two.
  5. I don't know if that is supported out of the box, but anything is possible if you're willing and able to write code. However, you absolutely don't have to do this, since Orchard comes with excellent User & Role management features out of the box. You don't have to write anything to enable user registration. It's just a matter of enabling user registration via the config page in the dashboard.

Good luck and have fun.

Dec 18, 2012 at 5:21 PM

Thanks for the prompt help - much appreciated.

Those answers are great for now, gives me a much better idea of all this.

I'm a very experienced C# developer and wanted to avoid/minimize writing code - it seems like Orchard offers me this for what I need anayway (a small software company website).

One question - when doing the initial 'Getting Started' I did not see any mention of how to change the header text at the top of each page.

I went to Widgets but the widget Header seems to not be enabled (this is the default demo site I'm referring to) for any of the layers - yet it is visible on every page (I wanted to edit this replacing the text with a logo image file). I'd probably also want to change the appearance of the header area too - so I guess one can tweak the colors etc of the theme?

Thanks again.

KC

 

Dec 18, 2012 at 5:49 PM
Edited Dec 18, 2012 at 5:50 PM

I think you are referring to the Header shape. You see, in Orchard, we have a concept called Shapes, which really are just dynamic objects used as view models. To render a shape, we use Razor templates which follow a certain naming convention so that Orchard knows based on the name of a shape which template to use to render that shape. If you have a look at the Layout.cshtml file in TheThemeMachine, you should be able to see a line somewhere at the beginning where a Branding shape is being added to the Header zone. This Branding shape is rendered using the Branding.cshtml Razor template.

Now, it's generally not recommended to modify stuff that comes out of the box with the installation. Instead, you should create your own Themes and Modules. When you generate your own Theme, you have the option of inheriting from an existing Theme. That way, you can selectively override views of the base Theme. Alternatively, you could create a copy of an existing theme and change it in anyway you see fit.

To learn more about creating your own theme, please consult the docs, but do let us know if you run into any issues or have questions.

Dec 18, 2012 at 7:16 PM
Edited Dec 18, 2012 at 7:20 PM
sfmskywalker wrote:

I think you are referring to the Header shape. You see, in Orchard, we have a concept called Shapes, which really are just dynamic objects used as view models. To render a shape, we use Razor templates which follow a certain naming convention so that Orchard knows based on the name of a shape which template to use to render that shape. If you have a look at the Layout.cshtml file in TheThemeMachine, you should be able to see a line somewhere at the beginning where a Branding shape is being added to the Header zone. This Branding shape is rendered using the Branding.cshtml Razor template.

Now, it's generally not recommended to modify stuff that comes out of the box with the installation. Instead, you should create your own Themes and Modules. When you generate your own Theme, you have the option of inheriting from an existing Theme. That way, you can selectively override views of the base Theme. Alternatively, you could create a copy of an existing theme and change it in anyway you see fit.

To learn more about creating your own theme, please consult the docs, but do let us know if you run into any issues or have questions.


Thanks and I appreciate the detail - will dig down at some point I'm sure.

For now I just enabled the Header widget and made it HTML, then I simply imported the logo image, by disabling the "rendering" for the header title it looks fine.

However beneath my logo is the text company name - the "Site name" - I can see this in Settings - General but see no option to not-render it.

Is there a way to make the site name invisible?

The site name displayed appears to be associated with no zone - is that correct?

Thx

KC

Dec 18, 2012 at 7:25 PM

There's a way, but it involves either tweaking the TheThemeMachine or overriding that theme, because you need to either modify Layout.cshtml or Branding.cshtml:

Delete or comment the line in Layout.cshtml where a Branding shape is being added,

Or: Delete or comment the contents of Branding.cshtml.

Dec 18, 2012 at 8:03 PM
sfmskywalker wrote:

There's a way, but it involves either tweaking the TheThemeMachine or overriding that theme, because you need to either modify Layout.cshtml or Branding.cshtml:

Delete or comment the line in Layout.cshtml where a Branding shape is being added,

Or: Delete or comment the contents of Branding.cshtml.


OK I'll look into that thanks - do you agree that this is a weakness? it seems the zone model is being sidelined here and the title text imposed upon the site with no option to disable it? Could the Settings editor be tweaked to allow render/no_render of the title text in a future build?

 

Thx

KC

Dec 18, 2012 at 8:07 PM

I tend to disagree, because this is clearly a Theming task, and theming is not the same thing as managing content.

That being said, however, I do think that it would be nice to have configurable themes, where you can go to a theme properties sheet and configure things like not only Title, but anything else the Theme author chose to expose as Theme Properties.

Dec 18, 2012 at 8:43 PM
Edited Dec 18, 2012 at 8:45 PM
sfmskywalker wrote:

I tend to disagree, because this is clearly a Theming task, and theming is not the same thing as managing content.

That being said, however, I do think that it would be nice to have configurable themes, where you can go to a theme properties sheet and configure things like not only Title, but anything else the Theme author chose to expose as Theme Properties.


You may be right - I'm a novice with website deisgn really - its just that the text, the string that is the website name is treated diffently to other text content and the name on every web page seems unrelated to the zones - anyway I'm getting somewhere and enjoying the system.

By the way if I wanted to add shopping cart and ability to download certain files after paying etc etc is this something supported through existing modules? any tutorials for adding this kind of thing?

I'd love to add a forum too - like this one we're using, is that something else I can add with relative ease?

Thanks for help.

KC

PS: I just removed the website name string from the Settings and its gone - but is there any downside to having no name? is the name used anywhere else than just being displayed under the heading zone?

 

Dec 19, 2012 at 10:20 AM
Edited Dec 19, 2012 at 10:21 AM

There is one Commerce module that I know of which is very good and used on a real production site. It's called Nwazet.Commerce. However I don't know if it supports downloading digital content out of the box (although the products do seem to have an "IsDigital" property if I remember correctly, so I would definitely give the module a try).

I'm currently working on a similar commerce / shopping cart implementation called DarkSky.Commerce, however it's still under heavy development and not usuable yet, unless you're a developer developing your own module and leverage the services that DarkSky.Commerce exposes. I'm using it for a commercial site where users can buy digital content, so it will eventually support your scenario.

If you're looking to develop your own module, there's a tutorial about writing a webshop module from scratch here: http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-part-1

Nicholas Mayne is working on a Forum module, you may want to have a look at that one.

The Site name is also used when sending email notifications to users, for example when a new user registers with your site, the email text uses the site name. Other than that I don't know if the Site name is being used. I would advice to keep the title and create your own theme and make the changes there. But that's up to you of course. If your approach works, it works.

Dec 20, 2012 at 12:43 AM

Hello KeepCalm,

Love the name. As sfmskywalker mentioned, there is the Nwazet.Commerce module. You will want to use the source code found here:

https://bitbucket.org/bleroy/nwazet.commerce

In addition to that, if you want some more features which are being pulled into that module (or hopefully will be), I have forked the module and added additional functionality here:

https://bitbucket.org/ems/nwazet.commerce/overview

To accomplish what you are looking to do, you would want to sell a "digital product" as sfmskywalker mentioned. However, the current "digital product" is directly tied to an online access, so you will have to go a step further. I have built the fork such that it is very extensible. I have a secure video module that checks the cart history using the extensibility to see if the user has purchased the video in the same way you would want to check if the person has purchased the rights to the document.  Another alternative, if it works for you, is to put the user into a role once they have made a purchase. This way, you can use traditional web.config to control access to a folder where your secure documents reside.  I will be working on a secure document module that is similar to the secure video one in the upcoming weeks if you don't want to give access to the whole folder using web.config.

In short, the Nwazet.Commerce framework is fantastic for starting your eCommerce. It has a lot built in and can be extended - throw up a fork and I will follow it.

Dec 20, 2012 at 11:05 AM
jao28 wrote:

Hello KeepCalm,

Love the name. As sfmskywalker mentioned, there is the Nwazet.Commerce module. You will want to use the source code found here:

https://bitbucket.org/bleroy/nwazet.commerce

In addition to that, if you want some more features which are being pulled into that module (or hopefully will be), I have forked the module and added additional functionality here:

https://bitbucket.org/ems/nwazet.commerce/overview

To accomplish what you are looking to do, you would want to sell a "digital product" as sfmskywalker mentioned. However, the current "digital product" is directly tied to an online access, so you will have to go a step further. I have built the fork such that it is very extensible. I have a secure video module that checks the cart history using the extensibility to see if the user has purchased the video in the same way you would want to check if the person has purchased the rights to the document.  Another alternative, if it works for you, is to put the user into a role once they have made a purchase. This way, you can use traditional web.config to control access to a folder where your secure documents reside.  I will be working on a secure document module that is similar to the secure video one in the upcoming weeks if you don't want to give access to the whole folder using web.config.

In short, the Nwazet.Commerce framework is fantastic for starting your eCommerce. It has a lot built in and can be extended - throw up a fork and I will follow it.


Thanks for this info Jao - very helpful indeed.

I will look at this - as I say I am a very experiencced tech Windows developer with tons of .Net, C# and CLR internals experience as well as OS internals etc - so actually developing and changing code is not a major concern - my main concern is "is this the best way for me" I am trying to determine what options there are for me to offer e-commerce for digital data - yes the Nwazet.Commerce may be ideal - but what other options are there I wonder.

Let me look at the links you posted - I'm very ineterested and will probably pester you later!

Thanks

KC