Freitag, 17. Oktober 2014

strange behaviour: bootstrap.css vs. site.css

Trying to apply some specific bootstrap layouts turned into strange results. For example I simple wanted to horizontally centering an input box, or one of these special composite bootstrap controls combining an Input box and a button left or right side, within a md-12 row and got a layout result that aligns the Input box left side and the button right side. The Level of strangeness depends on the current size of the viewport e.g. mobile phone vs. desktop monitor.

To resolve this issue I did a lot of stackoverflow but without any result.

I ended up with a simple approach: Remove the site.css file from spa template completely and andapt the bündle.config then.

This "tweak" works for me and did not result in any new layout issues ;-): The bootstrap Composite controls are now aligned/centered as expected. 

Donnerstag, 16. Oktober 2014

ASP.NET MVC5: Organizing large solutions with areas

A working example by code snob:

http://codesnob.wordpress.com/2014/03/06/mvc-area-in-an-external-assembly/

and the source code (vs solution):

https://github.com/drydenmaker/PMMA-MVC


Advice:
Perhaps if you are encountering an jquery error on executing too then please check the _Layout.cshtml file. Scroll to bottom of file and look for this stuff:

 
@Scripts.Render("~/bundles/jquery")

@Scripts.Render("~/bundles/bootstrap")

@RenderSection("scripts", required: false)


If  the line @Scripts.Render("~/bundles/jquery"

) is missing then please insert this code snippet right before  
@Scripts.Render("~/bundles/bootstrap")

Then it will work properly !

Thanks.


Mittwoch, 5. März 2014

Radar: Using inheritance patterns to organize large jquery applications

Blog post by Alex Sexton

https://alexsexton.com/blog/2010/02/using-inheritance-patterns-to-organize-large-jquery-applications/

Radar: How to manage large jquery apps

Slides by Alex Sexton:

http://de.slideshare.net/SlexAxton/how-to-manage-large-jquery-apps

Quote: Script Loader RequireJS and curl.js

Addy Osmani:

"There are a number of great loaders for handling module loading in the AMD and CommonJS formats, but my personal preferences are RequireJS and curl.js. Complete tutorials on these tools are outside the scope of this book, but I can recommend reading John Hann's article about curl.js and James Burke's RequireJS API documentation for more."

http://msdn.microsoft.com/en-us/magazine/hh227261.aspx

Source: http://addyosmani.com/resources/essentialjsdesignpatterns/book/#modularjavascript


Quote: Developers fall back on variations of the module or object literal

Addy Osmani:

"Unlike some more traditional programming languages however, the current iteration of JavaScript (ECMA-262) doesn't provide developers with the means to import such modules of code in a clean, organized manner. It's one of the concerns with specifications that haven't required great thought until more recent years where the need for more organized JavaScript applications became apparent.
Instead, developers at present are left to fall back on variations of the module or object literal patterns, which we covered earlier in the book. With many of these, module scripts are strung together in the DOM with namespaces being described by a single global object where it's still possible to incur naming collisions in our architecture. There's also no clean way to handle dependency management without some manual effort or third party tools."
 
 

Quote: backbone.js vs. knockout.js

Addy Osmani:

"To conclude, I personally find KnockoutJS more suitable for smaller applications whilst Backbone’s feature set really shines when building anything non-trivial. That said, many developers have used both frameworks to write applications of varying complexity and I recommend trying out both at a smaller scale before making a decision on which might work best for your Project."

Source: http://addyosmani.com/resources/essentialjsdesignpatterns/book/#detailmvvm

Samstag, 1. März 2014

WebDeploy: Successfully registered and logged in a new user using VS2013 SPA template with local IIS 7.x

1. Try a Login with user: demo and password: demodemo
 
 
 
2. Register with user:demo and password: demodemo
 
 
 
3. Displaying the Home welcome page after logged in successfully
 
 
 
4. Showing the data Schema with some user data that was entered automatically during registering process
 
 
 

WebDeploy: Now working with local IIS 7.x on root deployment

Actually there still exists a Problem - for me - to get a proper solution working with a URL that directs to a IIS subfolder. This problem is currently addressed solely to forementioned "UNKNOWN ERROR OCCURED" error, when a user sends a request to http://localhost/VS2013SPATemplateOriginal.


I did a simple workaround then. Deploying the whole stuff to the IIS root folder "Default Websites" the VS2013 SPA template works properly. A user sends a request by entering http://localhost and the stuff is up and running as expected.

Therefore I will skip further investigations and proceed examining the VS2013 SPA template en detail from now.

Working steps for web deployment by using VS2013 Publishing functionality:

1.  Publishing Connection
 
 

2. Publishing settings 
 
 
 
...and the Folder structure within IIS 7.x
 
 
 
...and the folder structure on disk by Windows Explorer
 
 
 
 
 
...and the output by Visual Studio during publishing that ends successfully:
 
1>------ Erstellen gestartet: Projekt: VS2013SPATemplateDemo, Konfiguration: Release Any CPU ------
1> VS2013SPATemplateDemo -> C:\Daten\Projekte\VS2013\WebApp\VS2013SPATemplateDemo\VS2013SPATemplateDemo\bin\VS2013SPATemplateDemo.dll
2>------ Veröffentlichungsvorgang gestartet: Projekt: VS2013SPATemplateDemo, Konfiguration: Release Any CPU ------
2>"Web.config" wurde mithilfe von "C:\Daten\Projekte\VS2013\WebApp\VS2013SPATemplateDemo\VS2013SPATemplateDemo\Web.Release.config" in "obj\Release\TransformWebConfig\transformed\Web.config" transformiert.
2>Alle Dateien werden in das unten genannte temporäre Verzeichnis zum Packen/Veröffentlichen kopiert:
2>obj\Release\AspnetCompileMerge\Source.
2>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\Daten\Projekte\VS2013\WebApp\VS2013SPATemplateDemo\VS2013SPATemplateDemo\obj\Release\AspnetCompileMerge\Source -u C:\Daten\Projekte\VS2013\WebApp\VS2013SPATemplateDemo\VS2013SPATemplateDemo\obj\Release\AspnetCompileMerge\TempBuildDir
2>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets(55,5): Warnung : Die angegebene DACPAC-Datei ist bereits vorhanden und wird überschrieben.
2>MSDeploy.dbDacFx (MSDeploy.dbDacFx) wird hinzugefügt.
2>Die Datenbank (C:\Daten\Projekte\VS2013\WebApp\VS2013SPATemplateDemo\VS2013SPATemplateDemo\obj\Release\AutoScripts\DefaultConnection_IncrementalSchemaOnly.dacpac) wird hinzugefügt.
2>Die automatische "ConnectionString" hat "obj\Release\AspnetCompileMerge\TempBuildDir\Areas\HelpPage\Views\Web.config" in "obj\Release\CSAutoParameterize\transformed\Areas\HelpPage\Views\Web.config" transformiert.
2>Die automatische "ConnectionString" hat "obj\Release\AspnetCompileMerge\TempBuildDir\Views\Web.config" in "obj\Release\CSAutoParameterize\transformed\Views\Web.config" transformiert.
2>Die automatische "ConnectionString" hat "obj\Release\AspnetCompileMerge\TempBuildDir\Web.config" in "obj\Release\CSAutoParameterize\transformed\Web.config" transformiert.
2>Alle Dateien werden in das unten genannte temporäre Verzeichnis zum Packen/Veröffentlichen kopiert:
2>obj\Release\Package\PackageTmp.
2>sitemanifest (sitemanifest) wird hinzugefügt.
2>Die Datenbank (data source=.\SQLExpress;initial catalog=VS2013SPATemplateDemoOriginalDB;integrated security=True;connect timeout=30) wird hinzugefügt.
2>Die Datei (Default Web Site\bin\App_global.asax.compiled) wird aktualisiert.
2>Die Datei (Default Web Site\bin\App_global.asax.dll) wird aktualisiert.
2>Die Datei (Default Web Site\PrecompiledApp.config) wird aktualisiert.
2>ACLs für den Pfad (Default Web Site) werden hinzugefügt.
2>ACLs für den Pfad (Default Web Site) werden hinzugefügt.
2>Die Veröffentlichung war erfolgreich.
2>Die Website wurde erfolgreich veröffentlicht http://localhost/
========== Erstellen: 1 erfolgreich, 0 fehlerhaft, 0 aktuell, 0 übersprungen ==========
========== Veröffentlichung: 1 erfolgreich, 0 Fehler, 0 übersprungen ==========
 
 

 

UnknownError: Hosting the VS2013 SPA template not in IIS root but subfolder

After deploying the VS2013 SPA template application including performed database schema changes the login resp. register form shows "unknown error occured" or "Unbekannter Fehler".
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Because the deployment process was successful I tried then to dissect this issue: 
 
 

Freitag, 28. Februar 2014

SQLExpress: Grant priviliges to IIS / SQLExpress

SQLServer Express script for registering a specific user and connect it with IIS
Source: http://www.asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/deploying-to-iis


use VS2013SPATemplateDemoOriginalDB
go
IF NOT EXISTS (SELECT name FROM sys.server_principals WHERE name = 'IIS APPPOOL\DefaultAppPool')
BEGIN
CREATE LOGIN [IIS APPPOOL\DefaultAppPool]
FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
GO
CREATE USER [VS2013SPATemplateDemoOriginalDBUser]
FOR LOGIN [IIS APPPOOL\DefaultAppPool]
GO
EXEC sp_addrolemember 'db_owner', 'VS2013SPATemplateDemoOriginalDBUser'
GO
 


    

SQLServer Express: Default Instance Name

http://stackoverflow.com/questions/3586196/default-instance-name-of-sql-server-express