Can i use asp.net just like C# and Vb.net

i am a new member here.

sorry for my newbie and very basic question, since i am a fresh student.

i like ruby and ironruby works for .net platform, thats what i know.

Can i work with asp.net, as easily with ironruby as asp.net works today
with C# and Vb.net.

i mean, is it possible to totally avoid C# or Vb.net while coding in
asp.net.

I like only Ruby/Ironruby… i am not fond of C# and vb.net at all.

i am talking about future, after the arrival of final version of
IronRuby. I know… its not fully working yet.

sorry for my ignorance, but i have to start somewhere, with guidance
from seniors.

bye.

Hi Rahil, I believe IronRuby support in ASP.NET is planned, similar to
how
IronPython is supported in ASP.NET now. But we just aren’t there yet.

Scott Hanselman gave a session at the ALT.NET Conference last October
showing how he got DLR languages wired into the ASP.NET MVC framework.
You
can find a link to the video at the following URL, just look for
“MVC+DLR=Love”.

http://www.hanselman.com/blog/ScottGuMVCPresentationAndScottHaScreencastFromALTNETConference.aspx

~Mike

On Fri, Mar 7, 2008 at 5:28 AM, Rahil K. [email protected]

Rahil K.:

Can i work with asp.net, as easily with ironruby as asp.net works today
with C# and Vb.net.

This is on the roadmap, and will be an important part of our .NET
Interop story. We haven’t had cycles to think about this yet.

I’d like to turn this around: how would the community like to see this
feature implemented? What exactly is it about Ruby and ASP.NET[MVC] that
makes it compelling? Do you have scenarios in mind?

Thanks,
-John

John L. (DLR) wrote:

Rahil K.:

Can i work with asp.net, as easily with ironruby as asp.net works today
with C# and Vb.net.

This is on the roadmap, and will be an important part of our .NET
Interop story. We haven’t had cycles to think about this yet.

I’d like to turn this around: how would the community like to see this
feature implemented? What exactly is it about Ruby and ASP.NET[MVC] that
makes it compelling? Do you have scenarios in mind?

Thanks,
-John

it would be nice to use the ruby hash/symbols over something like
c#/vb.net (don’t get me wrong, i love c# and even thanks to the new 3.0
specs for c# was able to create a ruby like hash for c#, but in mvc it
uses anonymous objects, and you know that uses reflection (which is a
performance hit), but I think using ruby like hashes and even symbols
would just make the code even that much more cleaner.

Though personally i’ve been working on a c# port of active record since
the whole asp.net mvc was announced, subsonic & castles active record
just doesn’t cut it. The activerecord stuff is in the
framework/amplify.widgets/amplify.activerecord folder, and the hash and
inflector.net extentions are in the framework/amplify.linq folder.

http://code.google.com/p/amplify-net/

Speaking for me personally it opens some doors that would remain closed
if
it isn’t from microsoft.

I see ASP.NET MVC as something like “Enterprise” rails. Some of the
places I
go to to consult classify themselves as being Microsoft shops, which is
their good right but it also means that they have a broad but limited
set of
options to choose from.
Currently I use castle for most of my .NET work and I get the same type
of
objection as I get for rails and it basically boils down to if it isn’t
from
Microsoft we don’t trust/want/look at it.
That would be one of the biggest reasons for me.

Asp.NET can also be interesting in cases where I want to use some more
complex controls and I don’t want to spend a lot of time learning yet
another new definitive javascript framework to get that functionality.
It
integrates on a lot more backend systems and isn’t opinionated on how
you
should design your database.

I can keep my old stuff but start adding new things in IronRuby without
the
application throwing a fit. I can start unit testing with RSpec …

These are just a couple of points from the top of my head, and before my
monday morning coffee, I’m sure there are a whole bunch of other
reasons. It
would be interesting to see for me too what people think and how they
plan
on using it.

my 2c
Ivan

The guy that wrote inflector.net created an orm called LightSpeed which
is
pretty much ActiveRecord from rails, but with some other nice things put
in
like the ability to choose a KeyTable identity strategy or use guids as
pk’s. It also uses IdentityMap internally etc.
That’s the ORM I mostly tend to use these days. I may be slightly
biased
because these guys are my friends :slight_smile:

Out of curiosity what is it that puts you off from Castle’s activerecord
or
Subsonic? And what is it you like so much about the Rails ActiveRecord
implementation?

On Mon, Mar 10, 2008 at 9:54 AM, Michael H. [email protected]

well castles is built right on top of nhiberate, added dependency with
added configuration

subsonic & castle both use a heavy object syntax

Query qry =new Query(“Products”).BETWEEN_AND(“DateExpires”,DateTime.Now,
DateTime.Now.AddDays(30);
qry.OrderBy = OrderBy.Asc(Product.Columns.ProductName);

vs

Entity object = Entity.Find(Conditions => new {"DateExpires > {0} AND DateExpires < {1}", DateTime.Now, DateTime.Now.AddDays(30) }, Order => "ProductName DESC");

and i could be wrong, but these are strongly typed objects, in rails,
its more of a decorated object, to which you do not need reflection in
order to access properties. so lets say you use a grid view and its
update event.

private void Grid_UpdatingRow(GridViewRowUpdateArgs e) { Entity obj = GetCurrentEntity(); obj.DateExpires = e.NewValues["DateExpires"]; obj.ProductName = e.NewValues["DateExpires"]; /// keep going.... obj.Save(); } // or private void Grid_UpdatingRow(GridViewRowUpdateArgs e) { Entity obj = GetCurrentEntity(); foreach(string key in e.NewValues.Keys)// performance hit obj.GetType.GetProperty(key).SetValue(obj, e.NewValues[key], null); obj.Save(); }

// using a decorated object

private void Grid_UpdatingRow(GridViewRowUpdateArgs e) {
Entity obj = GetCurrentEntity();
foreach(string key in e.NewValues.Keys)
obj[key] = e.NewValues[key]; // ideal
obj.Save();
}

its pretty much a matter of opinion. like with the new rails mvc, i
could grab the dictionary from the open and do something like

Enitity.Find(2).Merge(Request.Form).Save();

and even though subsonic is working on it, no migrations yet. I’ve
already gotten the concept of a migration working for sql.

Ivan Porto C. wrote:

The guy that wrote inflector.net created an orm called LightSpeed which
is
pretty much ActiveRecord from rails, but with some other nice things put
in
like the ability to choose a KeyTable identity strategy or use guids as
pk’s. It also uses IdentityMap internally etc.
That’s the ORM I mostly tend to use these days. I may be slightly
biased
because these guys are my friends :slight_smile:

Out of curiosity what is it that puts you off from Castle’s activerecord
or
Subsonic? And what is it you like so much about the Rails ActiveRecord
implementation?

On Mon, Mar 10, 2008 at 9:54 AM, Michael H. [email protected]

Rahil K.:

ROR is good, But Asp.Net + IronRuby opens up many doors of
opportunities and advantages, which are locked so far. As a student, i
have spend enough time to come a conclusion of selection of language
and i can even write a mini book in future, based on advantages with
Asp.Net + IronRuby.

Can you elaborate on this idea with some code fragments of how you would
like IronRuby + MVC to look like? Where would you like to see this? In
Views, in Controllers? Where does it make sense and where does it not
make sense. How exactly is ASP.NET MVC better than ROR? Can you put some
code frags side-by-side where you would show how something done in
IronRuby + MVC would be superior to something done in ROR?

Concrete examples, please.

Thanks,
-John

John L. (DLR) wrote:

Rahil K.:

I’d like to turn this around: how would the community like to see this
feature implemented? What exactly is it about Ruby and ASP.NET[MVC] that
makes it compelling? Do you have scenarios in mind?

Thanks,
-John


Hello,

You can check the comments here. It seems IronRuby + MVC, and IronRuby +
Asp.Net is the hottest thing which every one seeks.

ROR is good, But Asp.Net + IronRuby opens up many doors of opportunities
and advantages, which are locked so far. As a student, i have spend
enough time to come a conclusion of selection of language and i can even
write a mini book in future, based on advantages with Asp.Net +
IronRuby.

Its time, you make Asp.Net+ IronRuby, as your first plan on your Road
map and kindly give us as soon as possible.

John L. (DLR) wrote:

Can you elaborate on this idea with some code fragments of how you would
like IronRuby + MVC to look like? Where would you like to see this? In
Views, in Controllers? Where does it make sense and where does it not
make sense. How exactly is ASP.NET MVC better than ROR? Can you put some
code frags side-by-side where you would show how something done in
IronRuby + MVC would be superior to something done in ROR?

Concrete examples, please.

Thanks,
-John


Hi John,

As a Fresh student, i can give few points rather than codes and working
examples, since i am on a learning stage and i have not seen a single
code so far based on Asp.Net MVC + IronRuby…

I can quickly point few great advantages as below, with ROR is missing.

(1) Code behind/Code besides support with asp.net – ROR does not have
it.
(2) Master Pages —ROR does not have it except helper methods and
something alike for viewing
(3) BCL ( Great, BCL with almost 13,000 classes — ROR does not come
near by )
(4) Support to bring the classes from other languages like Iropython,
VB. C#
(5) Great MISCROSOFT brand name, that assures and gives a piece of mind
(6) WinForms and MVC way… Both the ways i can work — ROR has only
MVC
(7) IIS + SQL Server support— ROR developers are still struggling for
this
(8) Deployment as easy as click. ( Not easy with ROR )

Well i think, my other seniors around can write more on this, since as a
student i have limited knowledge currently, but this is what i have
gathered.

P.S:- BTW, dear John, you are a genius in this segment, you know much
much better than me, are you testing my knowledge level…? One thing i
can beat you here is… I am more IronRuby fan than you.

Cheers

Rahil

Allow me to correct you on certain points here

(1) Code behind/Code besides support with asp.net – ROR does not have
it.

RoR is MVC with passive views so you’re not coupling your event handling
from your view to your controller (on which an action can be viewed as
the
complete code behind/beside file from asp.NET). And quite frankly for
web
development I, personally, fail to see why you would want to use an
event
driven model.

  1. Master Pages —ROR does not have it except helper methods and
    something alike for viewing

Master pages are called layouts in RoR. If you want to use a master page
to
implement common logic that’s what the Application base class is for.

3 + 4 + 6) are all consequences of using the .NET framework and will
work
when IronRuby is complete. For windows forms development with Ruby you
can
take a look at the Connector for .NET from the Ruby In Steel guys or
rubyclr

  1. Good if you’re working in or with a “Microsoft shop”

  2. IIS support => you can reverse proxy to mongrel at this time and that
    should also work fine when IronRuby is implemented but also for RoR not
    just
    ASP.NET MVC or webforms. This doesn’t mean initial deployment is a walk
    in
    the park, it is rather painful.
    RoR doesn’t support all the features implemented in SQL Server if that’s
    what you’re getting at. That was a deliberate design choice they made
    for
    portability. So they support the common features on every platform. But
    it
    works fine with SQL server if you use it as intended. If you’re talking
    about getting a unix based box to talk to SQL Server that requires some
    configuration and setup on the OS level for ODBC etc. That is what makes
    it
    slightly harder I guess.

  3. Granted this one deployment can be a RPITA until you have your
    environments in sync and capistrano can make that a lot easier.

It looks like the problems you are having are not related to the Rails
framework but are rather due to the fact that MRI isn’t implemented in
.NET.

hope this helps a little.
Ivan

On Mon, Mar 10, 2008 at 4:50 PM, Rahil K. [email protected]

Ivan Porto C. wrote:

It looks like the problems you are having are not related to the Rails
framework but are rather due to the fact that MRI isn’t implemented in
.NET.

hope this helps a little.
Ivan


Yes Ivan

True indeed. We are currently learning with rails, but our target is to
get into IronRuby when it ships.

We decided to explore more of Rails and Merb, since there is time for
IronRuby, and we can be well prepared during that time, since ROR is
going to work with IronRuby, our efforts shall not be wasted.

Simultaneously, we want IronRuby to offer more, than what we are getting
currently.

Thanks for clearing our misunderstandings on our points above. Hope your
book will clear many other doubts in future.

Best wishes for your book.

Cheers

Rahil