-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 2.0 #20
Comments
I wanted to do migration for inheritance. But I have a problem. and e.g.: and if we have migration for A, B and C e.g.: and of course user can add other migration for any type in the future. Do you have any idea or do you think it is wrong way? Now, user have to create migrations for all type and he have to call base migration in subclass manually. Maybe it is ok and it not need changes? |
Are you familiar with EntityFramework, by chance? I think the way out here is to create an BTW, I don't think EntityFramework uses this strategy but it made me think of it FWIW. :) |
I don't understand you. I think you didn't wonder enough about what I wrote or I didn't write understandable. The idea is, ExtendedXmlSerializer could read any old XML. And If you have hierarchy of classes like this: And in the past the classes have changed and you have old XML from each period time. E.g.
E.g. We have only xml from A class. Currently you have to write migrations for each changes for class A. If you have another class Z that inherits from B you have to create migrations with changes from point 1,2,3 too. In new configuration I would like to create migrations for base class, that will be run for subclass. But if you think about all old xml you don't know which migrations you should run for xml. Becouse in xml you have only version of class A. E.g In case xml from point 3. You still have ver="1". I think that running migration from base class in subclass is wrong way. ExtendedXmlSerializer.CreateConfig(cfg=>{
cfg.ConfigType<C>().AddMigration(ClassCMigration);
cfg.ConfigType<B>().AddMigration(ClassBMigration);
cfg.ConfigType<A>().AddMigration(ClassAFirstMigration).AddMigration(ClassASecondMigration);
}); And for other options:
|
Ahhh yes I have toooo many problems floating in my head right now and I did not grasp this one, doh. Let me focus on getting you the PR and then we can circle back around to this one. I like how you're thinking though. :) |
I've added test for v2:
These results are not bad but they are not good enough. |
I think that your solution is too big for this small project. But it is good start. Did you read this book book https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X ? It could be good position for you. Anyway, I want to come back to configuration.
Then you will be able to create serializer:
In configuration you will be able to configure all settings: for example:
What do you think about it? |
I completely agree. This has been a good experience for me. In that have I have not been very pragmatic in my approach here, haha. Thanks for that book. I bought it!
You are far too kind! Those results are terrible haha. I basically took your awesome performance made nearly 20 times slower That is simply unacceptable! Not to mention incredibly embarrassing. 😛 I did do some further analysis over the weekend, and I was able to get a barebones test to about 400us, but it was very bare without any of the (bug-fixing) features I wanted to add. So, I feel that I have taken the wrong approach here and have gone down the wrong path. However, I do have another idea I want to try out. If I can get it within 250us, then I think that would be worth exploring. Otherwise, I might have to bow out and cut my losses here. :(
Very awesome. :) I approve. That would be a nice way to add extensions and such, too. My only concern is using a static entry point. Make sure that this is used for applications and not testing as this will break tests (two tests inadvertently using the same configuration). I've added this as #22 |
Are you working still on version 2 or you give up ? |
LOL no I am working on it! I have totally rewrote it and have got caught up in performance. It is much simpler now. However, not all the tests are passing yet. Once I get them passing I will send another PR your way. Hopefully today or tomorrow. This is the serializer still not deserializer. So the way I see it:
Taking a little longer than I had hoped, as it always does. I should be done by next week. Is that OK? |
That sounds amazing! Thank! I don't remember how fast was version 1.5.0, but 71 it is very fast. After these points we can publish version 2.0. Of course I will add information about your effort in readme ;) |
Cooooool. :) Yeah, I am full throttle on this. I guess I have an interest in serialization, haha. Plus there are new things I am learning such as .NET Core and Benchmark.NET, so it's been very valuable! Speaking of Benchmark,NET, I did get wrapped up this weekend with a mysterious issue that I couldn't seem to figure out. I have opened up an issue on Benchmark's repo, if you're interested: BTW, the v1.x serializer was getting 76-74us/op on my machine. |
Thank for info! I'll check it. |
I saw your code. It looks much better and it has good performance! Great job! In new year I will join to you to work on version 2.0. But now I have a holiday. |
Hey, thanks! Much appreciated! I am actually almost done with getting the tests passing. I should have that done today -- it's taken much much longer than anticipated! But once I have this checked in, it will be a much more simplified 2.0 and faster. Unfortunately, the ~71us was before adding the So next week I will be working on that ConfigurationAPI and hopefully when you can start working on this project again it will be done for you and I can finally start working on that deserializer. 👼 😄 Happy Holidays to you as well, @wojtpl2! I have appreciated the opportunity to assist you here. 👍 |
Great job!
|
Awesome! That's great, indeed. So basically maintaining v1 speed with a little overage. A couple thoughts:
Also, kind of weird that serializer is faster in .NET framework, but slower in .NET Core. heh. 😮 |
|
Coooooooool. On further thought, I think it's better to get the Deserializer done first, as that involves less work (or should involve less work) and will provide less risk to build further features upon. I will also see if I can attend to #14 as well (should also support |
What have you been up to? Have you worked on ExtendedXmlSerializer? Have you done something? |
Hey! Happy New Year. :) Yeah... I have worked on something but haven't finished it, unfortunately. Last week was not nearly as productive as I had hoped for, and it culminated in helping the parents with their home networking that took far much longer than it should have. In any case, I probably have a few more days on getting you a deserializer, unfortunately. Are you able to wait until Wednesday? |
Thank! Happy New Year for you too! |
Haha yeah no worries, just making sure! That's my problem is once I commit I feel obligated. I also want to be sure there are no pressing expectations on your side, either. So, OK then. I will check in on Wednesday and let you know. 👍 |
Heya... I wanted to check in. I have made some progress but it is taking a little longer than expected. I am thinking at this point I will have a new PR for the serializer/deserializer for you if not over the weekend then Monday at the very latest. I think I have finally landed on a design I am happy with, but I will not know until I am done and all the tests are passing haha. It looks promising, though. |
No worries. I really wonder what you've done. |
Haha nothing too impressive. Just making it WORK, for starters. :P I had some invalid assumptions with the serializer that didn't work so well with the deserializer, so things were inconsistent. And messy. :P |
Do you can push your changes to your repo or you want wait for the end of you work? I have time and I can read your code today. |
Yikes, yeah when I get it to a good point I will do that. I sort of got it into a funky state right now. I will try to give you some insight, however. I was using
So, simpler and more aligned with how you did things in v1.0. :) |
Also, I have gotten rid of the idea of "primitives" versus "objects". Now there are simply converters that are used for a particular type. This will make items such as #14 easier to implement, as well as implementing future types (such as |
Your changes are ok. And I'm happy with your fast work. I don't have enough time to finish this project on my own. I think that this project has potential. I would be sad if it ended in failure. I asked because I didn't see that in ExtendedXmlSerialization.Legacy you create old file ExtendedXmlSerializerConfig.cs with old functions. Sorry my fault. Now I understand. I will do profiles (or modules) quickly because it is easy for me. In this case maybe I wait for your changes. When you use configuration in v2, I'll be able to do this. What do you think? |
Ahhh yes, I would definitely wait for Configuration API integration work first if possible. I am cranking along here, so things are happening much faster. I should have attributes (#6) and collection properties (#7 ) done this weekend, and then all the extensions done next week. Then Configuration API to make it all work nicely. Then I can finally hand this off to you. :) |
Looks like VS2017 is set to be released on March 7th: It would be cool (and I think very doable) to launch v2 around that time, we could even promote it as a VS2017-based project. After we upgrade to it, of course. :) |
Here's a really nice example of a quick site we could put together: I just hate signing up for more work. ;) |
I've added information about v2 in article on CodeProject. |
7th March could be great date. I have birthday in half of March. 😄 |
Cool! Hopefully we can make this work out in time. And yes, the entire project structure will have to be migrated to 2017. project.json is no longer and has returned to .csproj. This will be a good opportunity to try all the new bits. We might want to try a little after 7th as it will take some time to adjust. So maybe on your birthday? 😄 Well, at the latest, at least. |
no comment for csproj 😞 I think that csproj is not bad but what for I learned project.json. Doesn't matter. |
Hah, well I'll comment on it: it's a total disaster! 😛 MSFT has done an amazing job with .NET and imperative code, but declarative data has not gotten the same treatment, and so here we are. I wish everything was Xaml, but alas I am but in the minority. I almost want to make EXS a Xaml parser still. :P I've put enough time into this already that I should! Haha... maybe v3 or something. |
That great! I've seen the page Polly web. This page was created in Ghost. Have you ever used it. |
Wow! that's interesting. That definitely makes it easier than I was anticipating. I like the look of Jekyll better, but I am not sure. There are so many to choose from! Have you had experience in any of these? My preference would be to go with something in .NET "just in case" but I am definitely open to alternatives. Whatever is easiest. :) |
I haven't. But both look promising.
WebApi, MVC, ASP.NET is good but not for static pages. I didn't find any generators for .net. Maybe because of front developers don't know .net.
I have experience in Angular, bootstrap and all .net technology (WebApi, MVC, ASP.NET) but we need something simpler. I don't want to create custom solution.
|
Yeah, definitely don't want to create a custom solution. I was thinking "just in case", but that is not a good way of thinking of things. 😮 |
How's everything coming along for v2? Do you need help? |
Hah! Probably a question I will never answer "yes" to. 👼 Things have gone a little slower than expected, but I am finally putting some features together. I hope to have #6 and collection properties done this weekend, and then start on the extensions (references, encryption, custom xml, and migrations) next week. If anything, I would like help on that website. Is that something you could probably assist with doing? |
Heya... heads up. Letting you know that with my latest commit that Hope that makes sense. I wanted to mention it here so you don't think I am deleting your work. I feel bad enough as it is with all the changes I've made... even if they are turning out pretty well now, finally. :) Please let me know if this will be a problem. |
Btw, have you seen VS2017 yet? It is currently clocking 7800 (!) problems. Last week it was ~6950 when I first saw it after it was launched: So, it might be best to wait a bit before using or upgrading to it. 😉 They might have an update for //build and/or Redstone 2 (Windows Creator Update). In any case, I am thinking upgrading to VS2017 should be the very very last thing we do before launching v2 LOL. |
In my case it can be tricky to have VS 2017 and new resharper. We must have web page if we want use free Resharper. I will submit our project to https://www.jetbrains.com/buy/opensource/?product=resharper |
Don't forget OzCode, as well! :D |
ok. |
I am going to close this issue now as everything is completed from a v2 perspective. The only thing not implemented in the original list yet is #14, which I will be attending to sometime soon. |
Awesome! So many changes! Thank! I'll try read this today and try v2.0. |
Cool. Hopefully it works OK for you. :) |
Topics to version 2.0:
The text was updated successfully, but these errors were encountered: