Hi everyone,
Making connector from nav to another webservice from cside takes a lot of codes and it's hard to maintain and write clean code compared to writing the same function in .net. This is one of examples.
This aims at small and mid companies. To me, maintainable and easy to understand code comes first then performance follows later even though I also care a lot about performance.
My question is : what if a .net assembly performs better or worse then it's c/side code equivalent?
I'm on my way to be MVP ... ( lolz )
Cheers,
0
Comments
Do you want to discuss if a .net assembly performs better or worse then it's c/side code equivalent?
If so, then i vote for the assembly to be more performant, since your c/al code is converted to .net anyway... so i guess you can write cleaner and more performatn code by doing your work in .net directly. Even if it's not more performant i bet its performance is not worse then with c/al so the huge advantage of the .net environment in case of consuming webservices is definitly the way to go!
Thanks, I thought the title provides enough information. It's my question exactly is what if a .net assembly performs better or worse then it's c/side code equivalent?
I've just heard this from my boss and I still don't understand why a legend language is translated to a modern one :P Do you have any good information about this ?
Thanks
That's why they postponed it to 2013 (in the roadmap presented at the same meeting). Although I haven't seen the new NAV yet. NAV is gradually going to C#, letting the developers use more and more C# for a smoother transfer.
|To-Increase|
You can take the best C# programmer in the world and let him loose in NAV and he will probably destroy NAV if he doesn't know NAV well and how to behave in NAV.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
RIS Plus, LLC
There was never an announcement that NAV was going to C#.
RIS Plus, LLC
http://mibuso.com/blogs/davidmachanick/
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Anybody already done it?
// Sorry for off-topic
Have a nice day !
If i find that powerpoint with that roadmap on, I can prove I was misinformed by MS
|To-Increase|
It's a smiple example but shows the idea behind it.
Here is the code:
Variables:
Name DataType Subtype Length
provider DotNet Microsoft.CSharp.CSharpCodeProvider.'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
CompilerParams DotNet System.CodeDom.Compiler.CompilerParameters.'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
result DotNet System.CodeDom.Compiler.CompilerResults.'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
object DotNet System.Object.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
MethodInfo DotNet System.Reflection.MethodInfo.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Array DotNet System.Array.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
string DotNet System.String.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
MethodResult DotNet System.Object.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
NavVariant Variant
Interesting !
First time, I'm thinking about writing cleaner and easy to use code. But now, it's getting more interesting with this complex one \:D/
Thanks
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
But to go a bit deeper about your points:
-I don't know exactly what you mean by IP protection.
-Performance could be saved by making a single instance codeunit and compile the assembly only once. So you have the performance drop only on the first call.
Single instance codeunit - not working e.g. for webservices.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Sorry, for going offtopic:
So "codeunit-A" uses a single instance "codeunit-SI"
When "codeunit-A" calls "codeunit-SI" to store a value, when "codeunit-A" calls "codeunit-B" will "codeunit-B" be able to get to the value by calling "codeunit-SI" ?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
But of course generating an "assembly" this way shouldn't be your first decision
Ok so webservices are a problem. Hmm but you could create the assembly not only in memory but write it to the local directory of the server(s), then you could load it from there, and only recompile it if it doesnt exists or if it's outdated.
Anyway i don't have any productive idea to use this sort of code distribution right now
Lets see what the future brings.