An outlet for my obsession with technology
Posts tagged c#
Help! Looking for a CSS DSL!
Nov 22nd
Update: Today Less CSS for .NET, or just .Less, was released. Its a port of the ruby LESS library and exactly what I was/am looking for. I updated my question on SO already.
—– old post ——
I posted this on stackoverflow.com already…..
I’ve been working on a really large project for almost 2 years and the client requirements keep changing. These changes, of course, effect everything and I would like to find a way to work with the CSS in a more dynamic fashion.
I assume I could get one of the ruby or python CSS DSLs running under ironRuby/Python but this client is very very particular about what software/frameworks are installed.
I have not found a CSS DSL where the base programming language is vb or c#.
reference: http://sandbox.pocoo.org/clevercss/ and http://nubyonrails.com/articles/dynamic-css
I guess another question is has anyone got either of these frameworks working under IronPython or IronRuby?
AutoDeploy – Dogfood
Jul 1st
Its been a very slow road for me and coding the last few weeks. Between constant meetings and having to rebuild my home workstation (beta –> RC), I’m surprised I’ve got anything done.
Current Status
AutoDeploy consists of internal services and a task is simply a container for the service definition and required attributes. the current services and completion % (total guess…there is no road-map so its pretty hard too tell)
- ASP.NET Build – 80%
- C# Build– 80%
- Custom Task (MEF) – 80%
- Database Migration – Not Started
- Email – 80%
- FileCopy – 80%
- Folder Monitor – 80%
- Ftp – 80%
- MS SQL Script – Not Started
- Subversion – 90%
- Vb Build – 80%
- Zip Compress – Not Started
Those listed with 80% function but have limited logging. Logging has been my biggest challenge. I want to ensure the logging (status, audit, etc) is available to the host program. AutoDeploy is only a dll and I’m having a hard time finding the best implementation to ensure that messages flow back to the host.
Without any more delay I present the current hotness…
The fluent interface (take 2)
1: var deployment = new Deployment();
2: deployment
3: .Named("PROJECTNAME")
4: .AtInterval(1)
5: .AddTask(
6: new FluentTask()
7: .Type(Task.TaskType.FolderMonitor)
8: .Source("http://REPO/tags/")
9: .Destination(@"D:\Temp\")
10: .Authentication()
11: .Credential(new NetworkCredential(@"UID","PASS"))
12: .Save()
13: )
14: .AddTask(
15: new FluentTask()
16: .Type(Task.TaskType.AspnetBuild)
17: .Save()
18: )
19: .AddTask(
20: new FluentTask()
21: .Type(Task.TaskType.FileCopy)
22: .Destination(@"\\SERVER_OR_LOCAL\Deployment")
23: .Save()
24: )
25: .AddCustomTask("WaitN")
26: .Save();
Changes of Note:
- Source and destination can be omitted and left to convention. In the second task there is no source or destination. The source will be the destination of the pervious task. The destination will be the destination of the pervious task plus the deployment name.
Classic Usage
1: var _deploymentContainer = DeploymentContainer.GetInstance;
2: var deployment = new Deployment();
3: deployment.Name = "PROJECT";
4: deployment.Interval = 5;
5:
6: var monitorTask = new Task();
7: monitorTask.Type = Task.TaskType.FolderMonitor;
8: monitorTask.Source = "http://subversion/repo/tags/";
9: monitorTask.Destination = @"C:\Temp\";
10: monitorTask.Authentication.Credentials _
11: = new NetworkCredential(@"DOMAIN\PolerckyE", "PASSWORD");
12:
13: deployment.AddTask(monitorTask);
14:
15: var buildTask = new Task();
16: buildTask.Type = Task.TaskType.AspnetBuild;
17: deployment.AddTask(buildTask);
18:
19: var copyTask = new Task();
20: copyTask.Type = Task.TaskType.FileCopy;
21: copyTask.Destination = @"\\ServerName\path\";
22: deployment.AddTask(copyTask);
23:
24: deployment.AddCustomTask("WaitN");
25:
26: _deploymentContainer.AddDeployment(deployment);
AutoDeploy Rework
Jun 12th
Tonight I reworked in workflow, persistence, mapping, and entities in AutoDeploy. The fire draft consisted of a single entity type with long descriptive janky attributes. The new core goes something like this
Deployment has a list of tasks. Tasks can be have a task type.
Example 1 Creating a new deployment:
1: var dep = new Deployment()
2: .AddTask(
3: new FluentTask()
4: .Source("")
5: .Destination("")
6: .Type(Task.TaskType.Subversion)
7: .Save())
8: .AddTask(
9: new FluentTask()
10: .Source("")
11: .Destination("")
12: .Type(Task.TaskType.AspnetBuild)
13: .Save()
14: );
Tools I want to use more
Jun 4th
As a follow up to my tools post here is a list of the tools I’d like to spend more time with. The % next to the title is an estimation as the likelihood I’ll do any serious work with the tool/software/etc.
ReSharper – 20%
http://www.jetbrains.com/resharper/
Simply put, ReSharper is a must-have productivity tool for .NET developers. It fully integrates with Visual Studio to intelligently and powerfully extend the functionality that is native to Visual Studio. ReSharper provides solution-wide error highlighting on the fly, instant solutions for found errors, over 30 advanced code refactorings, superior unit testing tools, handy navigation and search features, single-click code formatting and cleanup, automatic code generation and templates, and a lot more productivity features for C#, VB.NET, ASP.NET, XML, and XAML.
NDepend – 10%
NDepend is a tool that simplifies managing a complex .NET code base. Architects and developers can analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code.
C# – 70%
http://msdn.microsoft.com/en-us/vcsharp/default.aspx
NHibernate – 80%
https://www.hibernate.org/343.html
NHibernate is a port of Hibernate Core for Java to the .NET Framework. It handles persisting plain .NET objects to and from an underlying relational database. Given an XML description of your entities and relationships, NHibernate automatically generates SQL for loading and storing the objects. Optionally, you can describe your mapping metadata with attributes in your source code.
NUnit – 20%
http://www.nunit.org/index.php
NUnit is a unit-testing framework for all .Net languages. Initially ported from JUnit, the current production release, version 2.4, is the fifth major release of this xUnit based unit testing tool for Microsoft .NET. It is written entirely in C# and has been completely redesigned to take advantage of many .NET language features, for example custom attributes and other reflection related capabilities. NUnit brings xUnit to all .NET languages.
The Managed Extensibility Framework (MEF) is a new library in .NET that enables greater reuse of applications and components. Using MEF, .NET applications can make the shift from being statically compiled to dynamically composed. If you are building extensible applications, extensible frameworks and application extensions, then MEF is for you.
MEF – 60%
DDD – 100%