• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session Library differences between CI3 and CI4?

#1
Smile 
Ok, not sure I am posting this in the right section or not (if not please move it to the appropriate section), and for that matter if my question was already asked and in my 1/2 asleep state missed it elsewhere, but here goes.


I was reading the CI 4 docs for session handling and noticed the section: "A note about concurrency"...more specifically this/these lines:

from CI4: This detail was at the root of many issues and the main reason why CodeIgniter 4 has a completely re-written Session library.
and thought I read that line elsewhere, then I found an identical line in the CI3 session docs.


My question is: Has the session library been completely rewritten yet again from CI 3 to CI 4? or is this a case of the CI 4 docs just not having any housekeeping done on them yet?

Only asking this because anyone else who maybe browsing through the 2 different docs, either a CI 3 vet or someone doing due diligence investigating if CI 4 is right for their project, could get confused and wonder whats wrong with the session handling.  

Personally I haven't noticed any issues in the session handling, and am quite happy with the style CI 4 has adopted overall away from CI 3 conventions.

anyway, just thought I would ask.   Smile
Reply

#2
The concurrency part has to due with Ajax requests, you should always do a write close on the session
if your using Ajax requests.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(02-17-2020, 07:52 AM)InsiteFX Wrote: The concurrency part has to due with Ajax requests, you should always do a write close on the session
if your using Ajax requests.

Doesn't answer the question though.

Is the Session Handling Library in CI 4 brand new? Ie. Not the same as CI 3? If not, then perhaps the section for Concurrency in CI 4 Session doc should be rewritten so that it references the CI 3 rewrite instead of making it appear as if its a brand new library rewrite.
Reply

#4
Simply make difference between documentation and code base Smile
The code base has been remade while the functionality and the usable part is kept as close as possible to the old system. (typical compatibility effort - as much as possible)

Just cuz you see the same/similar docs, examples and structure doesn't mean that the source is just copy > pasted..

If you want to compare and comment just Open the GIT of CI 3 and CI 4 on Sessions .. and see the difference Smile
Best VPS Hosting : Digital Ocean
Reply

#5
I don't know if it is fair to say "completely", but substantially rewritten is a fair statement. That said, I think it fair to question the sentence "This detail was at the root of many issues and...". It fair to point out that's a quick rewrite of the copy from the v3 help. Whether it's true or not needs to be investigated.
Reply

#6
(02-17-2020, 03:20 PM)dave friend Wrote: I don't know if it is fair to say "completely", but substantially rewritten is a fair statement.  That said, I think it fair to question the sentence "This detail was at the root of many issues and...". It fair to point out that's a quick rewrite of the copy from the v3 help. Whether it's true or not needs to be investigated.

Thank you for answering the question itself.
Thats what caught my attention first and put me on to this question. 
I am sure a good amount of time was spent to make the Library CI 4-worthy, but if it was not that to a point where it quacks like a brand new duck, then maybe that line should be removed (or as I previously suggested, make it a reference to the rewrite in CI 3) to avoid any potential confusion for others like me that likes to go through legacy docs.   Smile
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.